diff options
Diffstat (limited to 'src/core/gpu')
-rw-r--r-- | src/core/gpu/cl/kernels/ClDequantizeKernel.cpp (renamed from src/core/gpu/cl/kernels/ClDequantizationKernel.cpp) | 14 | ||||
-rw-r--r-- | src/core/gpu/cl/kernels/ClDequantizeKernel.h (renamed from src/core/gpu/cl/kernels/ClDequantizationKernel.h) | 20 | ||||
-rw-r--r-- | src/core/gpu/cl/kernels/ClQuantizeKernel.cpp (renamed from src/core/gpu/cl/kernels/ClQuantizationKernel.cpp) | 14 | ||||
-rw-r--r-- | src/core/gpu/cl/kernels/ClQuantizeKernel.h (renamed from src/core/gpu/cl/kernels/ClQuantizationKernel.h) | 21 |
4 files changed, 29 insertions, 40 deletions
diff --git a/src/core/gpu/cl/kernels/ClDequantizationKernel.cpp b/src/core/gpu/cl/kernels/ClDequantizeKernel.cpp index 6421a08206..f2758b759f 100644 --- a/src/core/gpu/cl/kernels/ClDequantizationKernel.cpp +++ b/src/core/gpu/cl/kernels/ClDequantizeKernel.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/core/gpu/cl/kernels/ClDequantizationKernel.h" +#include "src/core/gpu/cl/kernels/ClDequantizeKernel.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -29,9 +29,11 @@ #include "arm_compute/core/TensorInfo.h" #include "arm_compute/core/Utils.h" #include "arm_compute/core/Validate.h" + #include "src/core/CL/CLValidate.h" #include "src/core/helpers/AutoConfiguration.h" #include "src/core/helpers/WindowHelpers.h" + #include "support/Cast.h" #include "support/StringSupport.h" @@ -59,11 +61,7 @@ Status validate_arguments(const ITensorInfo *src, const ITensorInfo *dst) } } // namespace -ClDequantizationKernel::ClDequantizationKernel() -{ -} - -void ClDequantizationKernel::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) +void ClDequantizeKernel::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) { ARM_COMPUTE_ERROR_ON_NULLPTR(src, dst); @@ -115,13 +113,13 @@ void ClDequantizationKernel::configure(const CLCompileContext &compile_context, ARM_COMPUTE_ERROR_ON(has_padding_changed(padding_info)); } -Status ClDequantizationKernel::validate(const ITensorInfo *src, const ITensorInfo *dst) +Status ClDequantizeKernel::validate(const ITensorInfo *src, const ITensorInfo *dst) { ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(src, dst)); return Status{}; } -void ClDequantizationKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) +void ClDequantizeKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) { ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window); diff --git a/src/core/gpu/cl/kernels/ClDequantizationKernel.h b/src/core/gpu/cl/kernels/ClDequantizeKernel.h index 3ccf90c204..33e0164cc9 100644 --- a/src/core/gpu/cl/kernels/ClDequantizationKernel.h +++ b/src/core/gpu/cl/kernels/ClDequantizeKernel.h @@ -21,29 +21,26 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CL_DEQUANTIZATION_KERNEL_H -#define ARM_COMPUTE_CL_DEQUANTIZATION_KERNEL_H +#ifndef ARM_COMPUTE_CL_DEQUANTIZE_KERNEL_H +#define ARM_COMPUTE_CL_DEQUANTIZE_KERNEL_H -#include "arm_compute/core/KernelDescriptors.h" #include "src/core/common/Macros.h" #include "src/core/gpu/cl/ClCompileContext.h" #include "src/core/gpu/cl/IClKernel.h" namespace arm_compute { -class ICLTensor; - namespace opencl { namespace kernels { /** Interface for the dequantization layer kernel. */ -class ClDequantizationKernel : public IClKernel +class ClDequantizeKernel : public IClKernel { public: /** Default constructor */ - ClDequantizationKernel(); - ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(ClDequantizationKernel); + ClDequantizeKernel() = default; + ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(ClDequantizeKernel); /** Initialise the kernel's input and output * * @param[in] compile_context The compile context to be used. @@ -51,10 +48,9 @@ public: * @param[out] dst Destination tensor info. Data types supported: F16/F32. */ void configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst); - /** Static function to check if given info will lead to a valid configuration of @ref ClDequantizationKernel + /** Static function to check if given info will lead to a valid configuration * - * @param[in] src Input tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/QSYMM8/QSYMM16. - * @param[in] dst Output tensor info. Data types supported: F16/F32. + * Similar to @ref ClDequantizeKernel::configure() * * @return a status */ @@ -66,4 +62,4 @@ public: } // namespace kernels } // namespace opencl } // namespace arm_compute -#endif /*ARM_COMPUTE_CL_DEQUANTIZATION_KERNEL_H */ +#endif /* ARM_COMPUTE_CL_DEQUANTIZE_KERNEL_H */ diff --git a/src/core/gpu/cl/kernels/ClQuantizationKernel.cpp b/src/core/gpu/cl/kernels/ClQuantizeKernel.cpp index 9926123529..48d351d536 100644 --- a/src/core/gpu/cl/kernels/ClQuantizationKernel.cpp +++ b/src/core/gpu/cl/kernels/ClQuantizeKernel.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/core/gpu/cl/kernels/ClQuantizationKernel.h" +#include "src/core/gpu/cl/kernels/ClQuantizeKernel.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -31,8 +31,10 @@ #include "arm_compute/core/Utils.h" #include "arm_compute/core/Validate.h" #include "arm_compute/core/utils/quantization/AsymmHelpers.h" + #include "src/core/CL/CLValidate.h" #include "src/core/helpers/WindowHelpers.h" + #include "support/Cast.h" #include "support/StringSupport.h" @@ -59,11 +61,7 @@ Status validate_arguments(const ITensorInfo *src, const ITensorInfo *dst) } } // namespace -ClQuantizationKernel::ClQuantizationKernel() -{ -} - -void ClQuantizationKernel::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) +void ClQuantizeKernel::configure(const CLCompileContext &compile_context, const ITensorInfo *src, ITensorInfo *dst) { ARM_COMPUTE_ERROR_ON_NULLPTR(src, dst); @@ -146,13 +144,13 @@ void ClQuantizationKernel::configure(const CLCompileContext &compile_context, IT ARM_COMPUTE_ERROR_ON(has_padding_changed(padding_info)); } -Status ClQuantizationKernel::validate(const ITensorInfo *src, const ITensorInfo *dst) +Status ClQuantizeKernel::validate(const ITensorInfo *src, const ITensorInfo *dst) { ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(src, dst)); return Status{}; } -void ClQuantizationKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) +void ClQuantizeKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) { ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(ICLKernel::window(), window); diff --git a/src/core/gpu/cl/kernels/ClQuantizationKernel.h b/src/core/gpu/cl/kernels/ClQuantizeKernel.h index 20822cf9c9..8d37f33032 100644 --- a/src/core/gpu/cl/kernels/ClQuantizationKernel.h +++ b/src/core/gpu/cl/kernels/ClQuantizeKernel.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CL_QUANTIZATION_KERNEL_H -#define ARM_COMPUTE_CL_QUANTIZATION_KERNEL_H +#ifndef ARM_COMPUTE_CL_QUANTIZE_KERNEL_H +#define ARM_COMPUTE_CL_QUANTIZE_KERNEL_H #include "src/core/common/Macros.h" #include "src/core/gpu/cl/ClCompileContext.h" @@ -30,8 +30,6 @@ namespace arm_compute { -class ICLTensor; - namespace opencl { namespace kernels @@ -40,12 +38,12 @@ namespace kernels * * @note The implementation supports only 3D input tensors. */ -class ClQuantizationKernel : public IClKernel +class ClQuantizeKernel : public IClKernel { public: /** Default constructor */ - ClQuantizationKernel(); - ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(ClQuantizationKernel); + ClQuantizeKernel() = default; + ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(ClQuantizeKernel); /** Set the input, output. * * @param[in] compile_context The compile context to be used. @@ -54,11 +52,10 @@ public: * * @note Output auto initialization is not supported by this kernel */ - void configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst); - /** Static function to check if given info will lead to a valid configuration of @ref ClQuantizationKernel + void configure(const CLCompileContext &compile_context, const ITensorInfo *src, ITensorInfo *dst); + /** Static function to check if given info will lead to a valid configuration * - * @param[in] src Input tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F32/F16. - * @param[in] dst Destination tensor info with the same dimensions of input. Data types supported: QASYMM8/QASYMM8_SIGNED/QASYMM16. + * Similar to @ref ClQuantizeKernel::configure() * * @return a status */ @@ -70,4 +67,4 @@ public: } // namespace kernels } // namespace opencl } // namespace arm_compute -#endif /*ARM_COMPUTE_CL_QUANTIZATION_KERNEL_H */ +#endif /* ARM_COMPUTE_CL_QUANTIZE_KERNEL_H */ |