From 1e12a2ae8028543334fb3628cdf577c9b6ff1d79 Mon Sep 17 00:00:00 2001 From: Skosh Date: Tue, 5 Mar 2024 15:44:54 +0200 Subject: [PATCH] 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 --- test/test_dtype.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_dtype.py b/test/test_dtype.py index e1c7bf8660..4060669fd5 100644 --- a/test/test_dtype.py +++ b/test/test_dtype.py @@ -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()