From 9730b8cc44d294b0ec90dd3fcef11a0adcfd4087 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Tue, 24 Dec 2024 01:54:03 -0800 Subject: [PATCH] Add MTL skip list for windows in extended folder Signed-off-by: Cheng, Penghui --- test/xpu/extended/run_test_with_skip_mtl.py | 22 +++++++++++++++++++++ test/xpu/extended/skip_list_win_mtl.py | 20 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 test/xpu/extended/run_test_with_skip_mtl.py create mode 100644 test/xpu/extended/skip_list_win_mtl.py diff --git a/test/xpu/extended/run_test_with_skip_mtl.py b/test/xpu/extended/run_test_with_skip_mtl.py new file mode 100644 index 000000000..6ed39a64e --- /dev/null +++ b/test/xpu/extended/run_test_with_skip_mtl.py @@ -0,0 +1,22 @@ +import os +import pytest +import sys +from skip_list_common import skip_dict +from skip_list_win import skip_dict as skip_dict_win +from skip_list_win_mtl import skip_dict as skip_dict_win_mtl + +IS_WINDOWS = sys.platform == "win32" + +skip_list = skip_dict["test_ops_xpu.py"] +if IS_WINDOWS: + skip_list += skip_dict_win["test_ops_xpu.py"] + skip_dict_win_mtl["test_ops_xpu.py"] + +skip_options = "not " + skip_list[0] +for skip_case in skip_list[1:]: + skip_option = " and not " + skip_case + skip_options += skip_option + +os.environ["PYTORCH_TEST_WITH_SLOW"]="1" +test_command = ["-k", skip_options, "test_ops_xpu.py", "-v"] +res = pytest.main(test_command) +sys.exit(res) \ No newline at end of file diff --git a/test/xpu/extended/skip_list_win_mtl.py b/test/xpu/extended/skip_list_win_mtl.py new file mode 100644 index 000000000..b0d971c6e --- /dev/null +++ b/test/xpu/extended/skip_list_win_mtl.py @@ -0,0 +1,20 @@ +skip_dict = { + # failed on MTL windows, skip first for Preci + "test_ops_xpu.py": ( + "test_compare_cpu_sqrt_xpu_complex64", + "test_backward_nn_functional_adaptive_avg_pool2d_xpu_float32", + + "test_compare_cpu_cosh_xpu_complex128", + "test_compare_cpu_frexp_xpu_bfloat16", + "test_compare_cpu_frexp_xpu_float16", + "test_compare_cpu_frexp_xpu_float32", + "test_compare_cpu_frexp_xpu_float64", + "test_compare_cpu_max_pool2d_with_indices_backward_xpu_bfloat16", + "test_compare_cpu_max_pool2d_with_indices_backward_xpu_float16", + "test_compare_cpu_max_pool2d_with_indices_backward_xpu_float32", + "test_compare_cpu_max_pool2d_with_indices_backward_xpu_float64", + "test_compare_cpu_nn_functional_avg_pool2d_xpu_bfloat16", + "test_compare_cpu_nn_functional_avg_pool2d_xpu_float32", + "test_compare_cpu_nn_functional_avg_pool3d_xpu_float32", + ), +}