Skip to content

Commit

Permalink
only add fp8 if has_device_capability(89)
Browse files Browse the repository at this point in the history
Signed-off-by: Randall Smith <[email protected]>
  • Loading branch information
rasmith committed Nov 6, 2024
1 parent d5e390d commit f003676
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/kernels/test_scaled_mm_triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def get_8bit_types():
types = [torch.int8]
if current_platform.is_rocm():
types.append(torch.float8_e4m3fnuz)
elif current_platform.is_cuda():
elif (current_platform.is_cuda()
and current_platform.has_device_capability(89)):
types.append(torch.float8_e4m3fn)
return types

Expand All @@ -46,8 +47,6 @@ def get_8bit_types():
@pytest.mark.parametrize("use_scalar_scale_a", [True, False])
@pytest.mark.parametrize("use_scalar_scale_b", [True, False])
@pytest.mark.parametrize("use_bias", [True, False])
@pytest.mark.skipif(not current_platform.has_device_capability(89),
reason="FP8 is not supported on this GPU type.")
def test_scaled_mm(M, N, K, in_dtype, out_dtype, use_scalar_scale_a,
use_scalar_scale_b, use_bias):
is_floating_point_type = lambda t: torch.tensor([1, 1], dtype=t
Expand Down

0 comments on commit f003676

Please sign in to comment.