Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nvfuser executor] Allow sm89 for fp8 types #1576

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions thunder/executors/nvfuserex_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ def is_supported_devicetype(devicetype: DeviceType) -> bool:


def device_supports_fp8() -> bool:
cuda_major, _ = torch.cuda.get_device_capability()
return cuda_major > 8
cuda_major, cuda_minor = torch.cuda.get_device_capability()
return (cuda_major, cuda_minor) >= (8, 9)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize that this is an ugly bit...

I think the full logic here should copy this: https://github.com/NVIDIA/Fuser/blob/6fa084312d7eec5c69d59f3eb3cbdd9fa72a1600/csrc/device_lower/analysis/device_version.cpp#L24-L39

But that's a lot... We should have a generic API on nvfuser side that does is_dtype_support_on_device(dtype, device_index)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Python function exposed by nvFuser for this logic would be great!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Even if we don't do that in this PR, an issue for it would be great)



def is_supported_dtype(dtype: type | dtypes.dtype, *, allow_low_precision_floats: bool = True) -> bool:
Expand Down
Loading