From 55e60d6ac46deb07a81e45f971c355350f1ca152 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Shubham=20Gupta/SNAP=20/SRI-Bangalore/Engineer/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 21 Dec 2018 06:37:18 +0530 Subject: [PATCH] Removing unnecessary preprocessor argument in StridedSlice op (#4102) Since Element_size is not getting used in the kernel, hence this patch will remove this unnecessary preprocessor argument for Element_size Signed-off-by: shubham --- libs/ARMComputeEx/src/core/CL/cl_kernels/strided_slice.cl | 3 ++- libs/ARMComputeEx/src/core/CL/kernels/CLStridedSliceKernel.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ARMComputeEx/src/core/CL/cl_kernels/strided_slice.cl b/libs/ARMComputeEx/src/core/CL/cl_kernels/strided_slice.cl index 4d96225..3477a0f 100644 --- a/libs/ARMComputeEx/src/core/CL/cl_kernels/strided_slice.cl +++ b/libs/ARMComputeEx/src/core/CL/cl_kernels/strided_slice.cl @@ -16,10 +16,10 @@ */ #include "helpers.h" +#if defined(ELEMENT_DATA_TYPE) && defined(DEPTH_OUT) /** Extracts a strided slice up to 4-dimensions * * @note Datatype should be given as a preprocessor argument using -DELEMENT_DATA_TYPE=type. e.g. -DELEMENT_DATA_TYPE=short - * @note The size of an element should be given as a preprocessor argument using -DELEMENT_SIZE=size. e.g. -DELEMENT_SIZE=2 * @attention Output tensor depth should be given as a preprocessor argument using -DDEPTH_OUT=size. e.g. -DDEPTH_OUT=16 * * @param[in] input_ptr Pointer to the source image. Supported data types: U8/S8/QS8/QASYMM8/U16/S16/QS16/F16/U32/S32/F32 @@ -60,3 +60,4 @@ __kernel void strided_slice(TENSOR4D_DECLARATION(input), }; *((__global ELEMENT_DATA_TYPE *)out.ptr) = *((__global ELEMENT_DATA_TYPE *)tensor4D_offset(&in, indices_in.x, indices_in.y, indices_in.z, indices_in.w)); } +#endif // defined(ELEMENT_DATA_TYPE) && defined(DEPTH_OUT) diff --git a/libs/ARMComputeEx/src/core/CL/kernels/CLStridedSliceKernel.cpp b/libs/ARMComputeEx/src/core/CL/kernels/CLStridedSliceKernel.cpp index c342552..d08cdc4 100644 --- a/libs/ARMComputeEx/src/core/CL/kernels/CLStridedSliceKernel.cpp +++ b/libs/ARMComputeEx/src/core/CL/kernels/CLStridedSliceKernel.cpp @@ -177,7 +177,6 @@ void CLStridedSliceKernel::configure(const ICLTensor *input, ICLTensor *output, std::set build_opts; build_opts.emplace("-DELEMENT_DATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type())); - build_opts.emplace("-DELEMENT_SIZE=" + support::cpp11::to_string(input->info()->element_size())); build_opts.emplace("-DDEPTH_OUT=" + support::cpp11::to_string(output->info()->dimension(2))); // Create kernel -- 2.7.4