diff options
author | Pablo Tello <pablo.tello@arm.com> | 2019-02-27 13:32:51 +0000 |
---|---|---|
committer | Giuseppe Rossini <giuseppe.rossini@arm.com> | 2019-03-08 10:41:25 +0000 |
commit | 471043616a869f0e696c8db4e1d0a62b45b4decf (patch) | |
tree | 79f3386c4d6757472835003fbf552566213f3bce /src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp | |
parent | adc5395ad72aceb2c9e7e6beb54d949959d35143 (diff) | |
download | ComputeLibrary-471043616a869f0e696c8db4e1d0a62b45b4decf.tar.gz |
COMPMID-1882: Improve memory coalescence when reshaping the weights for CLDepthwiseConvolution
Change-Id: I97788d9e349f37fcd818d588d668e2d5e22fd568
Signed-off-by: giuros01 <giuseppe.rossini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/818
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
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())); |