skip bf16 test if not supported by device (#14070)

This commit is contained in:
Garret Castro 2026-01-08 10:37:24 -08:00 committed by GitHub
commit 16b652302e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -309,6 +309,7 @@ class TestDiskTensor(unittest.TestCase):
assert ret.tolist() == [2827, 3341, 3855, 4369]
@unittest.skipIf(OSX or Device.DEFAULT == "CL", "new LLVM has an issue on OSX, CL=1 gives the wrong output")
@unittest.skipUnless(is_dtype_supported(dtypes.bfloat16), "bfloat16 not supported")
def test_bf16_disk_write_read(self):
t = Tensor([10000, -1, -1000, -10000, 20], dtype=dtypes.float32)
t.to(f"disk:{temp('dt_bf16_disk_write_read_f32')}").realize()