diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_ref.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_ref.cpp index 5f3a423c5b5606..2ee687f9d5d5a1 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_ref.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_ref.cpp @@ -72,7 +72,9 @@ static size_t packing_factor(const resample_params& params) { size_t input_factor = get_layout_packing_factor(params.inputs[0].GetLayout()); size_t output_factor = get_layout_packing_factor(params.output.GetLayout()); - return std::min(input_factor, output_factor); + if (input_factor % output_factor == 0 || output_factor % input_factor == 0) + return std::min(input_factor, output_factor); + return 1; } static bool use_packing(const resample_params& params) { @@ -83,8 +85,7 @@ static bool use_packing(const resample_params& params) { if (pack == 1) return false; - if (params.inputs[0].Feature().v % pack != 0 || params.output.Feature().v % pack != 0 || - params.inputs[0].Feature().pad.before % pack != 0 || params.output.Feature().pad.before % pack != 0) + if (params.inputs[0].Feature().pad.before % pack != 0 || params.output.Feature().pad.before % pack != 0) return false; auto packed_work_items = params.output.X().v * params.output.Y().v * params.output.Z().v diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/resample_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/resample_gpu_test.cpp index dfd70913a3e6e1..d06f938f349eef 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/resample_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/resample_gpu_test.cpp @@ -775,4 +775,6 @@ INSTANTIATE_TEST_CASE_P(smoke, .smoke_params(data_types::f32, format::b_fs_yx_fsv16, format::b_fs_yx_fsv16) .smoke_params(data_types::f16, format::b_fs_yx_fsv16, format::b_fs_yx_fsv16) + .smoke_params(data_types::i8, format::b_fs_yx_fsv16, format::b_fs_yx_fsv16) + .smoke_params(data_types::u8, format::b_fs_yx_fsv16, format::b_fs_yx_fsv16) ), );