Skip to content
Open
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
18 changes: 9 additions & 9 deletions tests/lax_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@ def testDotAlgorithm(self, algorithm, dtype):
raise SkipTest(
f"The dot algorithm '{algorithm}' requires CUDA compute "
"capability >= 8.0.")
# TF32 is not supported on Navi/RDNA GPUs. XLA only allows it on
# MI100+ (gfx9 CDNA) -- see xla/service/algorithm_util.cc.
if (algorithm in {lax.DotAlgorithmPreset.TF32_TF32_F32,
lax.DotAlgorithmPreset.TF32_TF32_F32_X3}
and jtu.is_device_rocm()
and "Radeon" in jax.local_devices()[0].device_kind):
raise SkipTest(
f"The dot algorithm '{algorithm}' is not supported on "
"Navi/RDNA GPUs.")
elif algorithm not in {
lax.DotAlgorithmPreset.DEFAULT,
lax.DotAlgorithmPreset.ANY_F8_ANY_F8_F32,
Expand All @@ -1189,15 +1198,6 @@ def testDotAlgorithm(self, algorithm, dtype):
}:
raise SkipTest(
f"The dot algorithm '{algorithm}' is not supported on GPU.")
if jtu.test_device_matches(["tpu"]):
if algorithm not in {
lax.DotAlgorithmPreset.DEFAULT,
lax.DotAlgorithmPreset.BF16_BF16_F32,
lax.DotAlgorithmPreset.BF16_BF16_F32_X3,
lax.DotAlgorithmPreset.BF16_BF16_F32_X6,
}:
raise SkipTest(
f"The dot algorithm '{algorithm}' is not supported on TPU."
)
lhs_shape = (3, 4)
rhs_shape = (4, 3)
Expand Down