Skip to content

Commit

Permalink
[2.5][Windows] Enable UTs (#853)
Browse files Browse the repository at this point in the history
cherry-pick #782

---------

Co-authored-by: Mo, Kanya <kanya.mo@intel.com>
  • Loading branch information
min-jean-cho and Kanya-Mo authored Aug 31, 2024
1 parent f8a395e commit c77e902
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 3 deletions.
8 changes: 7 additions & 1 deletion test/xpu/run_test_with_skip_arc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
import sys
from skip_list_common import skip_dict
from skip_list_arc import skip_dict as skip_dict_specifical
from skip_list_win import skip_dict as skip_dict_win
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 key not in skip_dict_specifical else skip_dict[key] + skip_dict_specifical[key]
skip_list = skip_dict[key]
if key in skip_dict_specifical:
skip_list += skip_dict_specifical[key]
if IS_WINDOWS and key in skip_dict_win:
skip_list += skip_dict_win[key]
res += launch_test(key, skip_list)

exit_code = os.WEXITSTATUS(res)
Expand Down
8 changes: 7 additions & 1 deletion test/xpu/run_test_with_skip_mtl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
import sys
from skip_list_common import skip_dict
from skip_list_mtl import skip_dict as skip_dict_specifical
from skip_list_win import skip_dict as skip_dict_win
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 key not in skip_dict_specifical else skip_dict[key] + skip_dict_specifical[key]
skip_list = skip_dict[key]
if key in skip_dict_specifical:
skip_list += skip_dict_specifical[key]
if IS_WINDOWS and key in skip_dict_win:
skip_list += skip_dict_win[key]
res += launch_test(key, skip_list)

exit_code = os.WEXITSTATUS(res)
Expand Down
2 changes: 1 addition & 1 deletion test/xpu/skip_list_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@
"test_gather_backward_with_empty_index_tensor_sparse_grad_True_xpu_float64",
),

"test_autograd_fallback.py": None,
"test_autograd_fallback_xpu.py": None,

"test_sort_and_select_xpu.py": ("test_sort_large_slice_xpu",), # Hard code CUDA

Expand Down
75 changes: 75 additions & 0 deletions test/xpu/skip_list_win.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
skip_dict = {
# SYCL default context is not supported on Windows
"test_tensor_creation_ops_xpu.py": (
"test_alias_from_dlpack_xpu_bfloat16",
"test_alias_from_dlpack_xpu_complex128",
"test_alias_from_dlpack_xpu_complex64",
"test_alias_from_dlpack_xpu_float16",
"test_alias_from_dlpack_xpu_float32",
"test_alias_from_dlpack_xpu_float64",
"test_alias_from_dlpack_xpu_int16",
"test_alias_from_dlpack_xpu_int32",
"test_alias_from_dlpack_xpu_int64",
"test_alias_from_dlpack_xpu_int8",
"test_alias_from_dlpack_xpu_uint8",
"test_copy_from_dlpack_xpu_bfloat16",
"test_copy_from_dlpack_xpu_complex128",
"test_copy_from_dlpack_xpu_complex64",
"test_copy_from_dlpack_xpu_float16",
"test_copy_from_dlpack_xpu_float32",
"test_copy_from_dlpack_xpu_float64",
"test_copy_from_dlpack_xpu_int16",
"test_copy_from_dlpack_xpu_int32",
"test_copy_from_dlpack_xpu_int64",
"test_copy_from_dlpack_xpu_int8",
"test_copy_from_dlpack_xpu_uint8"
),
# SYCL compiler issue where host and device results differ for math ops with complex dtypes
"test_unary_ufuncs_xpu.py": (
"test_reference_numerics_extremal__refs_atanh_xpu_complex128",
"test_reference_numerics_extremal__refs_atanh_xpu_complex64",
"test_reference_numerics_extremal__refs_nn_functional_tanhshrink_xpu_complex128",
"test_reference_numerics_extremal__refs_sin_xpu_complex128",
"test_reference_numerics_extremal__refs_sin_xpu_complex64",
"test_reference_numerics_extremal__refs_sinh_xpu_complex128",
"test_reference_numerics_extremal__refs_sinh_xpu_complex64",
"test_reference_numerics_extremal__refs_tan_xpu_complex128",
"test_reference_numerics_extremal__refs_tan_xpu_complex64",
"test_reference_numerics_extremal_atanh_xpu_complex128",
"test_reference_numerics_extremal_atanh_xpu_complex64",
"test_reference_numerics_extremal_nn_functional_tanhshrink_xpu_complex128",
"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_extremal_square_xpu_complex128",
"test_reference_numerics_extremal_square_xpu_complex64",
"test_reference_numerics_extremal_tan_xpu_complex128",
"test_reference_numerics_extremal_tan_xpu_complex64",
"test_reference_numerics_large__refs_cos_xpu_complex128",
"test_reference_numerics_large__refs_cos_xpu_complex32",
"test_reference_numerics_large__refs_cos_xpu_complex64",
"test_reference_numerics_large__refs_cosh_xpu_complex32",
"test_reference_numerics_large__refs_exp_xpu_complex128",
"test_reference_numerics_large__refs_exp_xpu_complex32",
"test_reference_numerics_large__refs_exp_xpu_complex64",
"test_reference_numerics_large__refs_sin_xpu_complex128",
"test_reference_numerics_large__refs_sin_xpu_complex32",
"test_reference_numerics_large__refs_sin_xpu_complex64",
"test_reference_numerics_large__refs_sinh_xpu_complex32",
"test_reference_numerics_large__refs_tan_xpu_complex32",
"test_reference_numerics_large_cos_xpu_complex128",
"test_reference_numerics_large_cos_xpu_complex32",
"test_reference_numerics_large_cos_xpu_complex64",
"test_reference_numerics_large_exp_xpu_complex128",
"test_reference_numerics_large_exp_xpu_complex64",
"test_reference_numerics_large_sin_xpu_complex128",
"test_reference_numerics_large_sin_xpu_complex32",
"test_reference_numerics_large_sin_xpu_complex64",
"test_reference_numerics_small_acos_xpu_complex32",
),
"test_ops_xpu.py": (
"test_compare_cpu_pow_xpu_bfloat16", # https://github.com/intel/torch-xpu-ops/pull/764
),

}
File renamed without changes.

0 comments on commit c77e902

Please sign in to comment.