From 7c1c6efee5a7580eec0fe544bfc762fe9761c2dd Mon Sep 17 00:00:00 2001 From: chenyu Date: Thu, 8 Feb 2024 20:10:25 -0500 Subject: [PATCH] exclude half with PYTHON in test_dtype.is_dtype_supported (#3351) half memoryview only in 3.12+. rest of the test_dtype (bounty) seems to be legit issue in ops_python. --- test/test_dtype.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_dtype.py b/test/test_dtype.py index babb7b233c..31c6fc148a 100644 --- a/test/test_dtype.py +++ b/test/test_dtype.py @@ -21,7 +21,8 @@ def is_dtype_supported(dtype: DType, device: str = Device.DEFAULT): # for CI GPU, cl_khr_fp16 isn't supported # for CI LLVM, it segfaults because it can't link to the casting function # CUDA in CI uses CUDACPU that does not support half - if dtype == dtypes.half: return not (CI and device in ["GPU", "LLVM", "CUDA"]) + # PYTHON supports half memoryview in 3.12+ https://github.com/python/cpython/issues/90751 + if dtype == dtypes.half: return not (CI and device in ["GPU", "LLVM", "CUDA"]) and device != "PYTHON" if dtype == dtypes.float64: return device != "METAL" and not (OSX and device == "GPU") return True