Skip to content

Commit eb43a94

Browse files
authored
Clean skip list for UT cases (#762)
Clean skip list for UT cases. --------- Signed-off-by: Cheng Penghui <[email protected]>
1 parent 13955ba commit eb43a94

File tree

3 files changed

+27
-47
lines changed

3 files changed

+27
-47
lines changed

test/xpu/run_test_with_skip.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@
1010
skip_list = skip_dict[key]
1111
res += launch_test(key, skip_list)
1212

13-
res += launch_test("test_segment_reductions_xpu.py")
14-
1513
exit_code = os.WEXITSTATUS(res)
1614
sys.exit(exit_code)

test/xpu/skip_list_common.py

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,15 @@
749749
),
750750

751751
"test_scatter_gather_ops_xpu.py": (
752-
"test_gather_backward_with_empty_index_tensor_sparse_grad_True_xpu_float32", # Could not run 'aten::_sparse_coo_tensor_with_dims_and_tensors' with arguments from the 'SparseXPU' backend.
753-
"test_gather_backward_with_empty_index_tensor_sparse_grad_True_xpu_float64", # Could not run 'aten::_sparse_coo_tensor_with_dims_and_tensors' with arguments from the 'SparseXPU' backend.
752+
# NotImplementedError: Could not run 'aten::_indices' with arguments from the 'SparseXPU' backend.
753+
# https://github.com/intel/torch-xpu-ops/issues/484
754+
"test_gather_backward_with_empty_index_tensor_sparse_grad_True_xpu_float32",
755+
"test_gather_backward_with_empty_index_tensor_sparse_grad_True_xpu_float64",
754756
),
755757

756758
"test_autograd_fallback.py": None,
757759

758-
"test_sort_and_select_xpu.py":("test_sort_large_slice_xpu",), # Hard code CUDA
760+
"test_sort_and_select_xpu.py": ("test_sort_large_slice_xpu",), # Hard code CUDA
759761

760762
"nn/test_embedding_xpu.py": (
761763
# NotImplementedError: Could not run 'aten::_indices' with arguments from the 'SparseXPU' backend.
@@ -821,6 +823,7 @@
821823
),
822824

823825
"test_transformers_xpu.py": (
826+
# https://github.com/intel/torch-xpu-ops/issues/761
824827
# AssertionError: False is not true
825828
# CPU fallback failure. To support aten::transformer_encoder_layer_forward with proper priority.
826829
"test_disable_fastpath_xpu",
@@ -829,6 +832,7 @@
829832
# Could not run 'aten::_to_copy' with arguments from the 'NestedTensorXPU' backend
830833
"test_with_nested_tensor_input_xpu",
831834
# Double and complex datatype matmul is not supported in oneDNN
835+
# https://github.com/intel/torch-xpu-ops/issues/253
832836
"test_sdp_math_gradcheck_contiguous_inputs_False_xpu",
833837
"test_sdp_math_gradcheck_contiguous_inputs_True_xpu",
834838
"test_transformerencoder_batch_first_True_training_True_enable_nested_tensor_True_xpu",
@@ -871,13 +875,7 @@
871875
"test_scaled_dot_product_attention_3D_input_dim_2D_attn_mask_dropout_p_0_0_xpu",
872876
),
873877

874-
"test_complex_xpu.py": (
875-
# Skip CPU case
876-
"test_eq_xpu_complex128",
877-
"test_eq_xpu_complex64",
878-
"test_ne_xpu_complex128",
879-
"test_ne_xpu_complex64",
880-
),
878+
"test_complex_xpu.py": None,
881879

882880
"test_modules_xpu.py": (
883881
# oneDNN issues
@@ -1217,8 +1215,11 @@
12171215

12181216
"test_dataloader_xpu.py": (
12191217
# Skip for XPU didn't support
1220-
"test_nested_tensor_multiprocessing",
1218+
# https://github.com/intel/torch-xpu-ops/issues/613
1219+
"test_nested_tensor_multiprocessing_context_forkserver_xpu",
1220+
"test_nested_tensor_multiprocessing_context_spawn_xpu",
12211221
# pinned memory issue
1222+
# https://github.com/intel/torch-xpu-ops/issues/296
12221223
"test_custom_batch_pin",
12231224
"test_sequential_pin_memory",
12241225
"test_shuffle_pin_memory",
@@ -1236,14 +1237,10 @@
12361237
"test_kaiser_window_xpu",
12371238
),
12381239

1239-
"test_autocast_xpu.py": (
1240-
# Frontend API support
1241-
# Unsupported XPU runtime functionality, '_set_cached_tensors_enabled'
1242-
# https://github.com/intel/torch-xpu-ops/issues/223
1243-
"test_cache_disabled",
1244-
),
1240+
"test_autocast_xpu.py": None,
12451241

12461242
"test_autograd_xpu.py": (
1243+
# https://github.com/intel/torch-xpu-ops/issues/618
12471244
# c10::NotImplementedError
12481245
"test_autograd_composite_implicit_and_dispatch_registration_xpu",
12491246
"test_autograd_multiple_dispatch_registrations_xpu",
@@ -1258,23 +1255,11 @@
12581255
"test_checkpointing_without_reentrant_memory_savings",
12591256
"test_flops_and_mem",
12601257
"test_profiler_emit_nvtx_xpu",
1261-
# RuntimeError: grad can be implicitly created only for scalar outputs
1262-
"test_reentrant_parent_error_on_cpu_xpu",
12631258
# Double and complex datatype matmul is not supported in oneDNN
12641259
"test_mv_grad_stride_0_xpu",
12651260
# module 'torch._C' has no attribute '_scatter'
12661261
"test_checkpointing_without_reentrant_dataparallel",
12671262
"test_dataparallel_saved_tensors_hooks",
1268-
# AssertionError: "none of output has requires_grad=True" does not match "PyTorch was compiled without CUDA support"
1269-
"test_checkpointing_without_reentrant_detached_tensor_use_reentrant_True",
1270-
# Skip device count < 2
1271-
"test_backward_device_xpu",
1272-
"test_inputbuffer_add_multidevice_xpu",
1273-
"test_unused_output_device_xpu",
1274-
# Skip CPU case
1275-
"test_copy__xpu",
1276-
"test_checkpointing_non_reentrant_autocast_cpu",
1277-
"test_per_dispatch_key_input_saving_xpu",
12781263
# Runtime error after enabling PTI
12791264
# RuntimeError: Fail to enable Kineto Profiler on XPU due to error code: 200
12801265
# https://github.com/intel/torch-xpu-ops/issues/731
@@ -1286,14 +1271,9 @@
12861271
# CPU/CUDA bias code in aten::mode_out
12871272
# https://github.com/intel/torch-xpu-ops/issues/327
12881273
# RuntimeError: mode only supports CPU AND CUDA device type, got: xpu
1289-
"test_dim_reduction",
1290-
"test_mode",
1274+
"test_mode_xpu",
1275+
"test_mode_wrong_dtype_xpu",
12911276
"test_dim_reduction_fns_fn_name_mode",
1292-
# CUDA skips the case in opdb.
1293-
# https://github.com/intel/torch-xpu-ops/issues/222
1294-
"test_ref_extremal_values_mean_xpu_complex64",
1295-
# CPU fallback fails (CPU vs Numpy).
1296-
"test_ref_small_input_masked_prod_xpu_float16",
12971277
),
12981278

12991279
"test_unary_ufuncs_xpu.py": (
@@ -2778,6 +2758,7 @@
27782758

27792759
"nn/test_convolution_xpu.py": (
27802760
# XPU unsupport ops, skip.
2761+
# https://github.com/intel/torch-xpu-ops/issues/348
27812762
"test_cudnn_convolution_relu_xpu_float16",
27822763
"test_cudnn_convolution_relu_xpu_float32",
27832764
"test_cudnn_convolution_add_relu_xpu_float16",
@@ -2787,12 +2768,7 @@
27872768
"test_Conv2d_groups_nobias",
27882769
),
27892770

2790-
"test_dynamic_shapes_xpu.py": (
2791-
# issue 746, new ut failures introduced by new pytorch
2792-
"test_method_fn_add_first_type_int_second_type_float",
2793-
"test_method_fn_mul_first_type_int_second_type_float",
2794-
"test_method_fn_sub_first_type_int_second_type_float",
2795-
),
2771+
"test_dynamic_shapes_xpu.py": None,
27962772

27972773
"nn/test_load_state_dict_xpu.py": None,
27982774

@@ -2803,4 +2779,6 @@
28032779
),
28042780

28052781
"nn/test_parametrization_xpu.py": None,
2782+
2783+
"test_segment_reductions_xpu.py": None,
28062784
}

test/xpu/test_autograd_xpu.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,13 @@ def foo(x, y, z):
263263
self.assertEqual(expected_dtype, z.dtype)
264264
return z
265265

266-
x = torch.randn(3, 3, requires_grad=True, device="xpu")
267-
y = torch.randn(3, 3, requires_grad=True, device="xpu")
268-
z = torch.randn(3, 3, requires_grad=True, device="xpu")
266+
x = torch.randn(3, 3, requires_grad=True)
267+
y = torch.randn(3, 3, requires_grad=True)
268+
z = torch.randn(3, 3, requires_grad=True)
269+
if device_type == "xpu":
270+
x = x.xpu()
271+
y = y.xpu()
272+
z = z.xpu()
269273

270274
with torch.autocast(
271275
enabled=enabled, device_type=device_type, dtype=torch.bfloat16

0 commit comments

Comments
 (0)