test: add failing bfloat16 test case for metal backend (#3481)

* test: add failing bfloat16 test case for metal backend

* test: move bfloat 16 test to dtypes test
This commit is contained in:
Skosh
2024-03-05 15:44:54 +02:00
committed by GitHub
parent 957e9800f1
commit 1e12a2ae80

View File

@@ -530,5 +530,11 @@ class TestAutoCastType(unittest.TestCase):
assert (Tensor([1, 2], dtype=dtypes.float16) / 2).dtype == dtypes.float16
assert (Tensor([1, 2], dtype=dtypes.float16) / 2.0).dtype == dtypes.float16
@unittest.skipIf(getenv("METAL", 0)== 0, "only run on METAL backend")
@unittest.expectedFailure
def test_bfloat16_metal(self):
x = Tensor.uniform(10, dtype=dtypes.bfloat16)
x.realize()
if __name__ == '__main__':
unittest.main()