From df4cf57c7394265b27d051cb1cf0152c53659126 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 9 Oct 2019 15:32:39 +0100 Subject: COMPMID-2306: CLDepthwiseConvolution: support for QUANT8_PER_CHANNEL_SYMM Change-Id: I18c886400daa2dcba0b91011bc4e503d807a4732 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/2143 Comments-Addressed: Arm Jenkins Reviewed-by: Giorgio Arena Tested-by: Arm Jenkins --- .../CL/kernels/CLHeightConcatenateLayerKernel.cpp | 30 +++------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp b/src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp index ea292c0b7b..85917d38dd 100644 --- a/src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp +++ b/src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp @@ -40,7 +40,8 @@ #include -using namespace arm_compute; +namespace arm_compute +{ namespace { std::pair validate_and_configure_window(ITensorInfo *input, unsigned int height_offset, ITensorInfo *output, unsigned int &num_elems_processed_per_iteration) @@ -102,31 +103,7 @@ void CLHeightConcatenateLayerKernel::configure(const ICLTensor *input, unsigned // Add build options CLBuildOptions build_opts; - - switch(input->info()->element_size()) - { - case 1: - { - build_opts.add_option("-DDATA_TYPE=uchar"); - break; - } - case 2: - { - build_opts.add_option("-DDATA_TYPE=short"); - break; - } - case 4: - { - build_opts.add_option("-DDATA_TYPE=int"); - break; - } - default: - { - ARM_COMPUTE_ERROR("Unsupported input data type."); - break; - } - } - + build_opts.add_option("-DDATA_TYPE=" + get_cl_unsigned_type_from_element_size(input->info()->element_size())); build_opts.add_option("-DVEC_SIZE=" + support::cpp11::to_string(_num_elems_processed_per_iteration)); build_opts.add_option("-DHEIGHT_OFFSET=" + support::cpp11::to_string(_height_offset)); build_opts.add_option("-DDEPTH=" + support::cpp11::to_string(input->info()->dimension(2))); @@ -164,3 +141,4 @@ void CLHeightConcatenateLayerKernel::run(const Window &window, cl::CommandQueue add_4D_tensor_argument(idx, _output, window); enqueue(queue, *this, window, lws_hint()); } +} // namespace arm_compute -- cgit v1.2.1