Skip to content

Commit 16a54d6

Browse files
[TEST] Fix test_typeconvert_upcast
Signed-off-by: Whitney Tsang <[email protected]>
1 parent 5f5feb0 commit 16a54d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python/test/unit/language/test_conversions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import triton
88
import triton.language as tl
99

10-
from triton._internal_testing import is_cuda, is_hip, is_hip_mi300
10+
from triton._internal_testing import is_cuda, is_hip, is_hip_mi300, is_xpu
1111

1212

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

325331
# dtype : (exponent_bits, mantissa_bits, exponent_bias, max_repr)
326332
stuff = {

0 commit comments

Comments
 (0)