diff options
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NCHWKernel.cpp | 5 | ||||
-rw-r--r-- | src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NCHWKernel.cpp b/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NCHWKernel.cpp index e8efe6f0a9..770740d180 100644 --- a/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NCHWKernel.cpp +++ b/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NCHWKernel.cpp @@ -171,7 +171,10 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen { const bool is_dot8_supported = dot8_supported(CLKernelLibrary::get().get_device()); - kernel_name = is_qasymm ? (std::string("depthwise_convolution_3x3_quantized") + (is_dot8_supported ? "_dot8" : "") + "_nchw") : "depthwise_convolution_3x3"; + kernel_name = is_qasymm ? "dwc_3x3_native_qasymm8" : "depthwise_convolution_3x3"; + kernel_name += (is_qasymm && is_dot8_supported ? "_dot8" : ""); + kernel_name += "_nchw"; + num_elems_written_per_iteration_x = 8 / data_size_from_type(input->data_type()); num_elems_written_per_iteration_y = (is_qasymm && conv_stride_y == 1) ? 2 : 1; num_elems_read_per_iteration_x = 3 + (num_elems_written_per_iteration_x - 1) * conv_stride_x; diff --git a/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp b/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp index a82d3a6fae..431039c31f 100644 --- a/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp +++ b/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp @@ -252,9 +252,21 @@ void CLDepthwiseConvolutionLayer3x3NHWCKernel::configure(const ICLTensor *input, build_opts.add_option_if(_input->info()->tensor_shape().total_size_upper(3) > 1, "-DDST_DEPTH=" + support::cpp11::to_string(static_cast<int>(std::ceil(_output->info()->dimension(2) / static_cast<float>(_num_planes_processed_per_iteration))))); + std::string kernel_name; // Create kernel - std::string kernel_name = std::string("depthwise_convolution_3x3") + (is_qasymm ? std::string("_quantized") + ((is_dot8_supported - && is_stride_1) ? "_dot8" : "") : "") + "_nhwc" + (is_stride_1 ? "_stride1" : ""); + if(is_qasymm) + { + kernel_name = std::string("dwc_3x3_reshaped_qasymm8"); + kernel_name += (is_dot8_supported && is_stride_1 ? "_dot8" : ""); + kernel_name += (is_stride_1 ? "_stride1" : ""); + kernel_name += "_nhwc"; + } + else + { + kernel_name = std::string("depthwise_convolution_3x3_nhwc"); + kernel_name += (is_stride_1 ? "_stride1" : ""); + } + ICLKernel::configure_internal(win_config.second); _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts.options())); |