From e9c0801d322097931d6325165e241fa8d618c746 Mon Sep 17 00:00:00 2001 From: Ilya Enkovich Date: Wed, 12 Jun 2024 10:42:32 -0700 Subject: [PATCH] Add a workaround for LLVM bug causing test failure on Skylake CPU. Signed-off-by: Ilya Enkovich --- python/test/unit/language/test_core.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/test/unit/language/test_core.py b/python/test/unit/language/test_core.py index f99e0a779f06..0db353b573fc 100644 --- a/python/test/unit/language/test_core.py +++ b/python/test/unit/language/test_core.py @@ -1604,6 +1604,12 @@ def test_cast(dtype_x, dtype_z, bitcast, size, num_ctas, device): if is_cpu() and (dtype_x in torch_float8_dtypes or dtype_z in torch_float8_dtypes): pytest.skip(f'test_cast{(dtype_x, dtype_z)} is not supported on CPU.') + # fptrunc fp32->fp16 is broken in LLVM for large vectors: + # https://github.com/llvm/llvm-project/issues/95274 + # TODO: remove the change after the bug is fixed. + if is_cpu() and dtype_x == "float32" and dtype_z == "float16": + size = 512 + # bf16 vector cast is broken in LLVM for large vectors: # https://github.com/llvm/llvm-project/issues/92471 # TODO: Remove the change after the bug is fixed.