From 0f48ac07e42ce30d2d07447f4b49bb4ab23f8e64 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Wed, 25 Dec 2024 09:10:36 +0800 Subject: [PATCH] Add skip lists for LNL, BGM and MTL devices (#1187) Add skip lists for LNL, BGM and MTL devices --------- Signed-off-by: Cheng, Penghui Signed-off-by: Cheng --- test/xpu/extended/run_test_with_skip_bmg.py | 22 ++++++++++++ test/xpu/extended/run_test_with_skip_lnl.py | 22 ++++++++++++ test/xpu/extended/run_test_with_skip_mtl.py | 22 ++++++++++++ test/xpu/extended/skip_list_win_bmg.py | 13 +++++++ test/xpu/extended/skip_list_win_lnl.py | 13 +++++++ test/xpu/extended/skip_list_win_mtl.py | 20 +++++++++++ test/xpu/run_test_with_skip_bmg.py | 24 +++++++++++++ test/xpu/run_test_with_skip_lnl.py | 24 +++++++++++++ test/xpu/skip_list_win_bmg.py | 39 +++++++++++++++++++++ test/xpu/skip_list_win_lnl.py | 38 ++++++++++++++++++++ 10 files changed, 237 insertions(+) create mode 100644 test/xpu/extended/run_test_with_skip_bmg.py create mode 100644 test/xpu/extended/run_test_with_skip_lnl.py create mode 100644 test/xpu/extended/run_test_with_skip_mtl.py create mode 100644 test/xpu/extended/skip_list_win_bmg.py create mode 100644 test/xpu/extended/skip_list_win_lnl.py create mode 100644 test/xpu/extended/skip_list_win_mtl.py create mode 100644 test/xpu/run_test_with_skip_bmg.py create mode 100644 test/xpu/run_test_with_skip_lnl.py create mode 100644 test/xpu/skip_list_win_bmg.py create mode 100644 test/xpu/skip_list_win_lnl.py diff --git a/test/xpu/extended/run_test_with_skip_bmg.py b/test/xpu/extended/run_test_with_skip_bmg.py new file mode 100644 index 000000000..6499550f5 --- /dev/null +++ b/test/xpu/extended/run_test_with_skip_bmg.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_bmg import skip_dict as skip_dict_win_bmg + +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_bmg["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) diff --git a/test/xpu/extended/run_test_with_skip_lnl.py b/test/xpu/extended/run_test_with_skip_lnl.py new file mode 100644 index 000000000..a795ca07a --- /dev/null +++ b/test/xpu/extended/run_test_with_skip_lnl.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_lnl import skip_dict as skip_dict_win_lnl + +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_lnl["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) 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_bmg.py b/test/xpu/extended/skip_list_win_bmg.py new file mode 100644 index 000000000..2ee1dd31e --- /dev/null +++ b/test/xpu/extended/skip_list_win_bmg.py @@ -0,0 +1,13 @@ +skip_dict = { + "test_ops_xpu.py": ( + # https://github.com/intel/torch-xpu-ops/issues/1173 + # Fatal Python error: Illegal instruction + "test_compare_cpu_grid_sampler_2d_xpu_float64", + "test_compare_cpu_cosh_xpu_complex64", + "test_compare_cpu_nn_functional_softshrink_xpu_bfloat16", + "test_compare_cpu_nn_functional_softshrink_xpu_float16", + "test_compare_cpu_nn_functional_softshrink_xpu_float32", + "test_compare_cpu_nn_functional_softshrink_xpu_float64", + "test_compare_cpu_square_xpu_complex128", + ), +} diff --git a/test/xpu/extended/skip_list_win_lnl.py b/test/xpu/extended/skip_list_win_lnl.py new file mode 100644 index 000000000..2ee1dd31e --- /dev/null +++ b/test/xpu/extended/skip_list_win_lnl.py @@ -0,0 +1,13 @@ +skip_dict = { + "test_ops_xpu.py": ( + # https://github.com/intel/torch-xpu-ops/issues/1173 + # Fatal Python error: Illegal instruction + "test_compare_cpu_grid_sampler_2d_xpu_float64", + "test_compare_cpu_cosh_xpu_complex64", + "test_compare_cpu_nn_functional_softshrink_xpu_bfloat16", + "test_compare_cpu_nn_functional_softshrink_xpu_float16", + "test_compare_cpu_nn_functional_softshrink_xpu_float32", + "test_compare_cpu_nn_functional_softshrink_xpu_float64", + "test_compare_cpu_square_xpu_complex128", + ), +} 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", + ), +} diff --git a/test/xpu/run_test_with_skip_bmg.py b/test/xpu/run_test_with_skip_bmg.py new file mode 100644 index 000000000..9bd360296 --- /dev/null +++ b/test/xpu/run_test_with_skip_bmg.py @@ -0,0 +1,24 @@ +import os +import sys +from skip_list_common import skip_dict +from skip_list_win import skip_dict as skip_dict_win +from skip_list_win_bmg import skip_dict as skip_dict_win_bmg +from xpu_test_utils import launch_test + + +res = 0 +IS_WINDOWS = sys.platform == "win32" + +for key in skip_dict: + skip_list = skip_dict[key] + if IS_WINDOWS and key in skip_dict_win: + skip_list += skip_dict_win[key] + if IS_WINDOWS and key in skip_dict_win_bmg: + skip_list += skip_dict_win_bmg[key] + res += launch_test(key, skip_list) + +if os.name == "nt": + sys.exit(res) +else: + exit_code = os.WEXITSTATUS(res) + sys.exit(exit_code) \ No newline at end of file diff --git a/test/xpu/run_test_with_skip_lnl.py b/test/xpu/run_test_with_skip_lnl.py new file mode 100644 index 000000000..4413626ea --- /dev/null +++ b/test/xpu/run_test_with_skip_lnl.py @@ -0,0 +1,24 @@ +import os +import sys +from skip_list_common import skip_dict +from skip_list_win import skip_dict as skip_dict_win +from skip_list_win_lnl import skip_dict as skip_dict_win_lnl +from xpu_test_utils import launch_test + + +res = 0 +IS_WINDOWS = sys.platform == "win32" + +for key in skip_dict: + skip_list = skip_dict[key] + if IS_WINDOWS and key in skip_dict_win: + skip_list += skip_dict_win[key] + if IS_WINDOWS and key in skip_dict_win_lnl: + skip_list += skip_dict_win_lnl[key] + res += launch_test(key, skip_list) + +if os.name == "nt": + sys.exit(res) +else: + exit_code = os.WEXITSTATUS(res) + sys.exit(exit_code) \ No newline at end of file diff --git a/test/xpu/skip_list_win_bmg.py b/test/xpu/skip_list_win_bmg.py new file mode 100644 index 000000000..a91d4f4a5 --- /dev/null +++ b/test/xpu/skip_list_win_bmg.py @@ -0,0 +1,39 @@ +skip_dict = { + # tensor(0.-0.j, device='xpu:0', dtype=torch.complex32) tensor(nan+nanj, device='xpu:0', dtype=torch.complex32) (1.5707964+0j) + "test_unary_ufuncs_xpu.pyy": ( + "test_reference_numerics_small_acos_xpu_complex32", + "test_reference_numerics_small_asin_xpu_complex32", + "test_reference_numerics_small_asinh_xpu_complex32", + "test_reference_numerics_small_atan_xpu_complex32", + "test_reference_numerics_small_atanh_xpu_complex32", + # Need to check compiler std::sin() on inf+infj + "test_reference_numerics_extremal__refs_sin_xpu_complex128", + "test_reference_numerics_extremal__refs_sin_xpu_complex64", + "test_reference_numerics_extremal_nn_functional_tanhshrink_xpu_complex128", + "test_reference_numerics_extremal_nn_functional_tanhshrink_xpu_complex64", + "test_reference_numerics_extremal_sin_xpu_complex128", + "test_reference_numerics_extremal_sin_xpu_complex64", + "test_reference_numerics_extremal_sinh_xpu_complex128", + "test_reference_numerics_extremal_sinh_xpu_complex64", + "test_reference_numerics_large__refs_sin_xpu_complex32", + "test_reference_numerics_large_sin_xpu_complex32", + # Known issue of exp accuracy + # tensor(13437.7000-501.j, device='xpu:0', dtype=torch.complex128) tensor(inf+infj, device='xpu:0', dtype=torch.complex128) (-inf+infj) + "test_reference_numerics_large__refs_exp_xpu_complex128", + "test_reference_numerics_large_exp_xpu_complex128", + "test_reference_numerics_small_exp_xpu_complex32", + ":test_reference_numerics_normal_special_i1_xpu_float32", + "test_reference_numerics_normal_sigmoid_xpu_complex32", + "test_reference_numerics_small_sigmoid_xpu_complex32", + ), + # https://github.com/intel/torch-xpu-ops/issues/1171 + # AssertionError: 'Assertion maxind >= 0 && maxind < outputImageSize failed' not found in '\nAssertHandler::printMessage\n' : The expected error was not found + "nn\test_pooling_xpu.py": ( + "test_MaxUnpool_index_errors_case1_xpu", + "test_MaxUnpool_index_errors_case2_xpu", + "test_MaxUnpool_index_errors_case4_xpu", + "test_MaxUnpool_index_errors_case6_xpu", + "test_MaxUnpool_index_errors_case7_xpu", + "test_MaxUnpool_index_errors_case9_xpu", + ), +} diff --git a/test/xpu/skip_list_win_lnl.py b/test/xpu/skip_list_win_lnl.py new file mode 100644 index 000000000..a9e8bfc3f --- /dev/null +++ b/test/xpu/skip_list_win_lnl.py @@ -0,0 +1,38 @@ +skip_dict = { + # tensor(0.-0.j, device='xpu:0', dtype=torch.complex32) tensor(nan+nanj, device='xpu:0', dtype=torch.complex32) (1.5707964+0j) + "test_unary_ufuncs_xpu.pyy": ( + "test_reference_numerics_small_acos_xpu_complex32", + "test_reference_numerics_small_asin_xpu_complex32", + "test_reference_numerics_small_asinh_xpu_complex32", + "test_reference_numerics_small_atan_xpu_complex32", + "test_reference_numerics_small_atanh_xpu_complex32", + # Need to check compiler std::sin() on inf+infj + "test_reference_numerics_extremal__refs_sin_xpu_complex128", + "test_reference_numerics_extremal__refs_sin_xpu_complex64", + "test_reference_numerics_extremal_nn_functional_tanhshrink_xpu_complex128", + "test_reference_numerics_extremal_nn_functional_tanhshrink_xpu_complex64", + "test_reference_numerics_extremal_sin_xpu_complex128", + "test_reference_numerics_extremal_sin_xpu_complex64", + "test_reference_numerics_extremal_sinh_xpu_complex128", + "test_reference_numerics_extremal_sinh_xpu_complex64", + "test_reference_numerics_large__refs_sin_xpu_complex32", + "test_reference_numerics_large_sin_xpu_complex32", + # Known issue of exp accuracy + # tensor(13437.7000-501.j, device='xpu:0', dtype=torch.complex128) tensor(inf+infj, device='xpu:0', dtype=torch.complex128) (-inf+infj) + "test_reference_numerics_large__refs_exp_xpu_complex128", + "test_reference_numerics_large_exp_xpu_complex128", + "test_reference_numerics_small_exp_xpu_complex32", + ":test_reference_numerics_normal_special_i1_xpu_float32", + "test_reference_numerics_normal_sigmoid_xpu_complex32", + ), + # https://github.com/intel/torch-xpu-ops/issues/1171 + # AssertionError: 'Assertion maxind >= 0 && maxind < outputImageSize failed' not found in '\nAssertHandler::printMessage\n' : The expected error was not found + "nn\test_pooling_xpu.py": ( + "test_MaxUnpool_index_errors_case1_xpu", + "test_MaxUnpool_index_errors_case2_xpu", + "test_MaxUnpool_index_errors_case4_xpu", + "test_MaxUnpool_index_errors_case6_xpu", + "test_MaxUnpool_index_errors_case7_xpu", + "test_MaxUnpool_index_errors_case9_xpu", + ), +}