diff --git a/src/ATen/native/xpu/sycl/Col2ImKernel.cpp b/src/ATen/native/xpu/sycl/Col2ImKernel.cpp index a0ba012c1..299711162 100644 --- a/src/ATen/native/xpu/sycl/Col2ImKernel.cpp +++ b/src/ATen/native/xpu/sycl/Col2ImKernel.cpp @@ -200,7 +200,7 @@ void col2im_kernel( bool batched_input = true; if (input.dim() == 2) { batched_input = false; - input.resize_({1, input.size(0), input.size(1)}); + input = input.view({1, input.size(0), input.size(1)}); } auto batch_size = input.size(0); diff --git a/src/ATen/native/xpu/sycl/Im2ColKernel.cpp b/src/ATen/native/xpu/sycl/Im2ColKernel.cpp index 149665bc7..aa511e6df 100644 --- a/src/ATen/native/xpu/sycl/Im2ColKernel.cpp +++ b/src/ATen/native/xpu/sycl/Im2ColKernel.cpp @@ -187,7 +187,7 @@ void im2col_kernel( if (input.dim() == 3) { batched_input = false; - input.resize_({1, input.size(0), input.size(1), input.size(2)}); + input = input.view({1, input.size(0), input.size(1), input.size(2)}); } auto batch_size = input.size(0); diff --git a/test/xpu/run_test_with_skip.py b/test/xpu/run_test_with_skip.py index 02e2542c8..ea50fbc29 100644 --- a/test/xpu/run_test_with_skip.py +++ b/test/xpu/run_test_with_skip.py @@ -1288,9 +1288,6 @@ def launch_test(test_case, skip_list=None, exe_list=None): # NotImplementedError: Could not run 'aten::_indices' with arguments from the 'SparseXPU' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). "test_EmbeddingBag_sparse_cuda", "test_Embedding_sparse_cuda", - # col2im: AssertionError: The values for attribute 'shape' do not match: torch.Size([16, 4]) != torch.Size([1, 16, 4]). - "test_Fold_no_batch_dim_input_cuda", # col2im - "test_Fold_no_batch_dim_int_input_cuda", # AssertionError: 'XPU error: device-side assert triggered' not found in ' File "", line 8\n def test_cross_entropy_loss_2d_out_of_bounds_class_index(self):\n ^\nIndentationError: expected an indented block\n' "test_cross_entropy_loss_2d_out_of_bounds_class_index_xpu_float16", "test_cross_entropy_loss_2d_out_of_bounds_class_index_xpu_float32",