Skip to content

Commit

Permalink
[TEST] Fix test_typeconvert_upcast
Browse files Browse the repository at this point in the history
Signed-off-by: Whitney Tsang <[email protected]>
  • Loading branch information
whitneywhtsang committed Jan 11, 2025
1 parent 5f5feb0 commit 16a54d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/test/unit/language/test_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import triton
import triton.language as tl

from triton._internal_testing import is_cuda, is_hip, is_hip_mi300
from triton._internal_testing import is_cuda, is_hip, is_hip_mi300, is_xpu


def matching_int(dtype):
Expand Down Expand Up @@ -321,6 +321,12 @@ def test_typeconvert_upcast(src_dtype, dst_dtype, device):
with pytest.raises(triton.CompilationError, match="not supported in this architecture"):
launch_exhaustive_populate(getattr(tl, src_dtype), 0, 65536, False, 8, 0x7f, device=device)
return
elif is_xpu():
if (src_dtype in ('float8e4b8', 'float8e5b16')):
# If the dtype should error out in the given device, we assert that and return
with pytest.raises(triton.CompilationError, match="not supported in this architecture"):
launch_exhaustive_populate(getattr(tl, src_dtype), 0, 65536, False, 8, 0x7f, device=device)
return

# dtype : (exponent_bits, mantissa_bits, exponent_bias, max_repr)
stuff = {
Expand Down

0 comments on commit 16a54d6

Please sign in to comment.