From 471043616a869f0e696c8db4e1d0a62b45b4decf Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Wed, 27 Feb 2019 13:32:51 +0000 Subject: COMPMID-1882: Improve memory coalescence when reshaping the weights for CLDepthwiseConvolution Change-Id: I97788d9e349f37fcd818d588d668e2d5e22fd568 Signed-off-by: giuros01 Reviewed-on: https://review.mlplatform.org/c/818 Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice --- .../kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp') 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(std::ceil(_output->info()->dimension(2) / static_cast(_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(CLKernelLibrary::get().create_kernel(kernel_name, build_opts.options())); -- cgit v1.2.1