diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2019-10-09 15:32:39 +0100 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2019-10-30 14:44:46 +0000 |
commit | df4cf57c7394265b27d051cb1cf0152c53659126 (patch) | |
tree | 87da5d6abeff65b2cee55b63f73bb268776af560 /src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp | |
parent | 8b72199f25487040713d1668c998fdde3707413c (diff) | |
download | ComputeLibrary-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/CLHeightConcatenateLayerKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLHeightConcatenateLayerKernel.cpp | 30 |
1 files changed, 4 insertions, 26 deletions
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 <map> -using namespace arm_compute; +namespace arm_compute +{ namespace { std::pair<Status, Window> 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 |