-
Notifications
You must be signed in to change notification settings - Fork 451
[Enhancement] Refactor CUDA vectorized cast generation and remove unsupported FP8 type #1474
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
Changes from all commits
a60139f
bffedae
7b76aaf
0e264c9
e344863
e68e073
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| from tvm import tir | ||
| import tvm.script.ir_builder.tir._ffi_api as tb_ffi | ||
| import numpy as np | ||
| from tilelang import logger | ||
|
|
||
| _T = TypeVar("_T") | ||
|
|
||
|
|
@@ -175,7 +176,7 @@ def __dtype_as_torch__(self: dtype) -> torch.dtype: | |
| elif dtype_str == "float8_e5m2": | ||
| assert hasattr(torch, "float8_e5m2"), "torch.float8_e5m2 is not supported in this version of torch. Please upgrade torch >= 2.1.0" | ||
| return torch.float8_e5m2 | ||
| elif dtype_str == "e4m3fnuz_float8": | ||
| elif dtype_str == "float8_e4m3fnuz": | ||
| assert hasattr(torch, "float8_e4m3fnuz"), ( | ||
| "torch.float8_e4m3fnuz is not supported in this version of torch. Please upgrade torch >= 2.2.0" | ||
| ) | ||
|
|
@@ -189,7 +190,10 @@ def __dtype_as_torch__(self: dtype) -> torch.dtype: | |
| assert hasattr(torch, "float4_e2m1fnx2"), ( | ||
| "torch.float4_e2m1fnx2 is not supported in this version of torch. Please upgrade torch >= 2.8.0" | ||
| ) | ||
| return torch.float4_e2m1fnx2 | ||
| return torch.float4_e2m1fn_x2 | ||
| elif dtype_str == "float4_e2m1fn": | ||
| logger.info("torch doesn't support float4_e2m1fn, using float4_e2m1fnx2 as storage dtype.") | ||
| return torch.float4_e2m1fn_x2 | ||
|
Comment on lines
190
to
+196
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new float4 mapping checks Useful? React with 👍 / 👎. |
||
| elif dtype_str in _STR_TO_TORCH_DTYPE: | ||
| return _STR_TO_TORCH_DTYPE[dtype_str] | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.