Skip to content

Commit

Permalink
Fixed col2im test case error: The values for attribute 'shape' do not…
Browse files Browse the repository at this point in the history
… match

Signed-off-by: Cheng Penghui <[email protected]>
  • Loading branch information
PenghuiCheng committed Jul 8, 2024
1 parent 441a56c commit 6045138
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ATen/native/xpu/sycl/Col2ImKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/ATen/native/xpu/sycl/Im2ColKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions test/xpu/run_test_with_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<string>", 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",
Expand Down

0 comments on commit 6045138

Please sign in to comment.