aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2019-10-09 15:32:39 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2019-10-30 14:44:46 +0000
commitdf4cf57c7394265b27d051cb1cf0152c53659126 (patch)
tree87da5d6abeff65b2cee55b63f73bb268776af560 /src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp
parent8b72199f25487040713d1668c998fdde3707413c (diff)
downloadComputeLibrary-df4cf57c7394265b27d051cb1cf0152c53659126.tar.gz
COMPMID-2306: CLDepthwiseConvolution: support for QUANT8_PER_CHANNEL_SYMM
Change-Id: I18c886400daa2dcba0b91011bc4e503d807a4732 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/2143 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp b/src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp
index 72f2ca40f5..7010dffd25 100644
--- a/src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp
+++ b/src/core/CL/kernels/CLGEMMReshapeLHSMatrixKernel.cpp
@@ -37,7 +37,8 @@
#include "arm_compute/core/Window.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
-using namespace arm_compute;
+namespace arm_compute
+{
using namespace arm_compute::misc::shape_calculator;
namespace
@@ -139,21 +140,7 @@ void CLGEMMReshapeLHSMatrixKernel::configure(const ICLTensor *input, ICLTensor *
build_opts.add_option_if(_reinterpret_input_as_3d, "-DREINTERPRET_INPUT_AS_3D");
build_opts.add_option_if(_reinterpret_input_as_3d, "-DHEIGHT_GEMM3D=" + support::cpp11::to_string(input->info()->dimension(1)));
build_opts.add_option_if(_reinterpret_input_as_3d, "-DDEPTH_GEMM3D=" + support::cpp11::to_string(input->info()->dimension(2)));
-
- switch(input->info()->element_size())
- {
- case 1:
- build_opts.add_option("-DDATA_TYPE=uchar");
- break;
- case 2:
- build_opts.add_option("-DDATA_TYPE=ushort");
- break;
- case 4:
- build_opts.add_option("-DDATA_TYPE=uint");
- break;
- default:
- ARM_COMPUTE_ERROR("Data type not supported");
- }
+ build_opts.add_option("-DDATA_TYPE=" + get_cl_unsigned_type_from_element_size(input->info()->element_size()));
std::string kernel_name("gemm_reshape_lhs_matrix_");
kernel_name += lhs_info.transpose ? "t" : "nt";
@@ -219,4 +206,5 @@ void CLGEMMReshapeLHSMatrixKernel::run(const Window &window, cl::CommandQueue &q
enqueue(queue, *this, slice, lws_hint());
}
while(window.slide_window_slice_3D(slice));
-} \ No newline at end of file
+}
+} // namespace arm_compute \ No newline at end of file