diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2018-06-28 16:29:29 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 215b4ea6c9dee480a22070d5873b0b8cb52531a0 (patch) | |
tree | 398e552c4d01c0b84d03a873098a9183ba8f82e4 /src/core/CL/kernels/CLWeightsReshapeKernel.cpp | |
parent | ad486e21e5870f41774f30825c270762e08ae71e (diff) | |
download | ComputeLibrary-215b4ea6c9dee480a22070d5873b0b8cb52531a0.tar.gz |
COMPMID-1277 - Optimizing CLIm2ColKernel for NHWC.
This patch includes:
- Im2Col optimizations for NHWC using a new data layout
- Refactoring of CLIm2ColKernel adding validation method and auto-init
- Removed im2col_reduced from CLIm2ColKernel and created a new kernel CLFlattenLayerKernel
Change-Id: I1620640b6796baa268324b33ae92cdd8de53e27c
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/141241
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLWeightsReshapeKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLWeightsReshapeKernel.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/CL/kernels/CLWeightsReshapeKernel.cpp b/src/core/CL/kernels/CLWeightsReshapeKernel.cpp index 9df91fccde..58ecd9ccb3 100644 --- a/src/core/CL/kernels/CLWeightsReshapeKernel.cpp +++ b/src/core/CL/kernels/CLWeightsReshapeKernel.cpp @@ -87,8 +87,7 @@ void CLWeightsReshapeKernel::configure(const ICLTensor *input, const ICLTensor * (biases != nullptr) ? biases->info() : nullptr, output->info(), num_groups)); - const DataType data_type = input->info()->data_type(); - const DataLayout data_layout = input->info()->data_layout(); + const DataType data_type = input->info()->data_type(); _biases = biases; _output = output; @@ -101,8 +100,7 @@ void CLWeightsReshapeKernel::configure(const ICLTensor *input, const ICLTensor * build_opts.add_option_if(biases != nullptr, "-DHAS_BIAS"); // Create kernel - std::string kernel_name = std::string("reshape_to_columns_") + lower_string(string_from_data_layout(data_layout)); - _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts.options())); + _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("reshape_to_columns", build_opts.options())); // Set static arguments unsigned int idx = num_arguments_per_3D_tensor() + num_arguments_per_2D_tensor(); |