Skip to content

Commit

Permalink
add two case to skip list and rename functor
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhuanMeng committed Jun 21, 2024
1 parent af3ec2f commit 88c6385
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
47 changes: 23 additions & 24 deletions src/aten/sycl/AveragePool2dKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ void avg_pool2d_frame(
}

template <typename scalar_t, typename accscalar_t, typename index_t>
struct AvgPool2dChannelsLastBackwardOutKernelFunctor {
struct AvgPool2dChannelsLastBackwardKernelFunctor {
void operator()(sycl::nd_item<1> item) const {
index_t index = item.get_global_linear_id();
if (index < total_elements) {
Expand Down Expand Up @@ -369,7 +369,7 @@ struct AvgPool2dChannelsLastBackwardOutKernelFunctor {
bottom_data[index] = static_cast<scalar_t>(gradient);
}
}
AvgPool2dChannelsLastBackwardOutKernelFunctor(
AvgPool2dChannelsLastBackwardKernelFunctor(
const scalar_t* top_data_,
scalar_t* bottom_data_,
int64_t total_elements_,
Expand Down Expand Up @@ -426,7 +426,7 @@ struct AvgPool2dChannelsLastBackwardOutKernelFunctor {
};

template <typename scalar_t, typename accscalar_t, typename index_t>
struct AvgPool2dBackwardOutKernelFunctor {
struct AvgPool2dBackwarKernelFunctor {
void operator()(sycl::nd_item<1> item) const {
index_t index = item.get_global_linear_id();
if (index < total_elements) {
Expand Down Expand Up @@ -474,7 +474,7 @@ struct AvgPool2dBackwardOutKernelFunctor {
bottom_data[index] = static_cast<scalar_t>(gradient);
}
}
AvgPool2dBackwardOutKernelFunctor(
AvgPool2dBackwarKernelFunctor(
const scalar_t* top_data_,
scalar_t* bottom_data_,
int64_t total_elements_,
Expand Down Expand Up @@ -558,7 +558,7 @@ void avg_pool2d_backward_channels_last_frame(
const uint32_t global_range =
ceil_div<uint32_t>(total_elements, group_size) * group_size;

auto caller = AvgPool2dChannelsLastBackwardOutKernelFunctor<
auto caller = AvgPool2dChannelsLastBackwardKernelFunctor<
scalar_t,
accscalar_t,
index_t>(
Expand Down Expand Up @@ -610,25 +610,24 @@ void avg_pool2d_backward_frame(
const uint32_t global_range =
ceil_div<uint32_t>(total_elements, group_size) * group_size;

auto caller =
AvgPool2dBackwardOutKernelFunctor<scalar_t, accscalar_t, index_t>(
top_data,
bottom_data,
total_elements,
channels,
height,
width,
pooled_height,
pooled_width,
kernel_h,
kernel_w,
stride_h,
stride_w,
pad_h,
pad_w,
divisor_override,
count_include_pad,
use_divisor);
auto caller = AvgPool2dBackwarKernelFunctor<scalar_t, accscalar_t, index_t>(
top_data,
bottom_data,
total_elements,
channels,
height,
width,
pooled_height,
pooled_width,
kernel_h,
kernel_w,
stride_h,
stride_w,
pad_h,
pad_w,
divisor_override,
count_include_pad,
use_divisor);
sycl_kernel_submit(global_range, group_size, queue, caller);
}

Expand Down
4 changes: 3 additions & 1 deletion test/xpu/run_test_with_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ def launch_test(test_case, skip_list=None, exe_list=None):
"test_non_standard_bool_values_argsort_xpu_bool", # The implementation aligns with CUDA, RuntimeError: "argsort" not implemented for 'Bool'.
"test_non_standard_bool_values_msort_xpu_bool", # The implementation aligns with CUDA, RuntimeError: "msort" not implemented for 'Bool'.
"test_non_standard_bool_values_sort_xpu_bool", # The implementation aligns with CUDA, RuntimeError: "sort" not implemented for 'Bool'.
"test_noncontiguous_samples_nn_functional_avg_pool2d_xpu_int64",# The implementation aligns with CUDA, RuntimeError: "avg_pool2d_out_xpu" not implemented for 'Long'.
"test_noncontiguous_samples_nn_functional_avg_pool2d_xpu_int64",# Align with CUDA dtypes - "avg_pool2d_out_xpu" not implemented for 'Long'.
"test_noncontiguous_samples_nn_functional_avg_pool1d_xpu_int64",# Align with CUDA dtypes - "avg_pool2d_out_xpu" not implemented for 'Long'.
"test_noncontiguous_samples_nn_functional_local_response_norm_xpu_int64",# Align with CUDA dtypes - "avg_pool2d_out_xpu" not implemented for 'Long'.
"test_dtypes_nn_functional_avg_pool2d_xpu",# Align with CUDA dtypes - "avg_pool2d_out_xpu" not implemented for 'Long'.
"test_complex_half_reference_testing_sigmoid_xpu_complex32", # Didn't align with CUDA, RuntimeError: "sigmoid_xpu" not implemented for 'ComplexHalf'
"test_dtypes_sigmoid_xpu", # Didn't align with CUDA, RuntimeError: "sigmoid_xpu" not implemented for 'ComplexHalf'
Expand Down

0 comments on commit 88c6385

Please sign in to comment.