diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-04-30 14:46:05 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-05-05 17:39:26 +0000 |
commit | ef516e8bb8eb7f55b410268587f3b88b77e2fd8e (patch) | |
tree | d2043bf6bae9c51ab0344a4e13f1c54205e28c3c /src/runtime/gpu | |
parent | 448cb45e2cb86f32a739c925a1ac8c688cf573bf (diff) | |
download | ComputeLibrary-ef516e8bb8eb7f55b410268587f3b88b77e2fd8e.tar.gz |
Rename Quantization/Dequantization kernels/operators to imperative mood
Renames the following kernels/functions
- [Cl|Cpu]DequantizationKernel -> [Cl|Cpu]DequantizeKernel
- [Cl|Cpu]Dequantization -> [Cl|Cpu]CpuDequantize
- [Cl|Cpu]QuantizationKernel -> [Cl|Cpu]QuantizeKernel
- [Cl|Cpu]Quantization -> [Cl|Cpu]Quantize
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Ic3c5eb3b7fe28f807294d159830eef99c2dd6219
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5566
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/gpu')
-rw-r--r-- | src/runtime/gpu/cl/operators/ClDequantize.cpp (renamed from src/runtime/gpu/cl/operators/ClQuantization.cpp) | 14 | ||||
-rw-r--r-- | src/runtime/gpu/cl/operators/ClDequantize.h (renamed from src/runtime/gpu/cl/operators/ClDequantization.h) | 18 | ||||
-rw-r--r-- | src/runtime/gpu/cl/operators/ClQuantize.cpp (renamed from src/runtime/gpu/cl/operators/ClDequantization.cpp) | 15 | ||||
-rw-r--r-- | src/runtime/gpu/cl/operators/ClQuantize.h (renamed from src/runtime/gpu/cl/operators/ClQuantization.h) | 23 |
4 files changed, 31 insertions, 39 deletions
diff --git a/src/runtime/gpu/cl/operators/ClQuantization.cpp b/src/runtime/gpu/cl/operators/ClDequantize.cpp index 2e753b550e..0c1391bb45 100644 --- a/src/runtime/gpu/cl/operators/ClQuantization.cpp +++ b/src/runtime/gpu/cl/operators/ClDequantize.cpp @@ -21,30 +21,30 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/runtime/gpu/cl/operators/ClQuantization.h" +#include "src/runtime/gpu/cl/operators/ClDequantize.h" #include "arm_compute/core/Error.h" #include "arm_compute/runtime/CL/CLScheduler.h" #include "src/core/gpu/cl/ClCompileContext.h" -#include "src/core/gpu/cl/kernels/ClQuantizationKernel.h" +#include "src/core/gpu/cl/kernels/ClDequantizeKernel.h" namespace arm_compute { namespace opencl { -void ClQuantization::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) +void ClDequantize::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) { - auto k = std::make_unique<kernels::ClQuantizationKernel>(); + auto k = std::make_unique<kernels::ClDequantizeKernel>(); k->configure(compile_context, src, dst); _kernel = std::move(k); } -Status ClQuantization::validate(const ITensorInfo *src, const ITensorInfo *dst) +Status ClDequantize::validate(const ITensorInfo *src, const ITensorInfo *dst) { - return kernels::ClQuantizationKernel::validate(src, dst); + return kernels::ClDequantizeKernel::validate(src, dst); } -void ClQuantization::run(ITensorPack &tensors) +void ClDequantize::run(ITensorPack &tensors) { ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided"); CLScheduler::get().enqueue_op(*_kernel.get(), tensors); diff --git a/src/runtime/gpu/cl/operators/ClDequantization.h b/src/runtime/gpu/cl/operators/ClDequantize.h index a696b73d2e..47fad3eeee 100644 --- a/src/runtime/gpu/cl/operators/ClDequantization.h +++ b/src/runtime/gpu/cl/operators/ClDequantize.h @@ -21,10 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CL_DEQUANTIZATION_H -#define ARM_COMPUTE_CL_DEQUANTIZATION_H +#ifndef ARM_COMPUTE_CL_DEQUANTIZE_H +#define ARM_COMPUTE_CL_DEQUANTIZE_H -#include "arm_compute/core/KernelDescriptors.h" #include "src/core/gpu/cl/ClCompileContext.h" #include "src/runtime/gpu/cl/IClOperator.h" @@ -32,12 +31,12 @@ namespace arm_compute { namespace opencl { -/** Basic function to run @ref kernels::ClDequantizationKernel that dequantizes an input tensor */ -class ClDequantization : public IClOperator +/** Basic function to run @ref kernels::ClDequantizeKernel that dequantizes an input tensor */ +class ClDequantize : public IClOperator { public: /** Constructor */ - ClDequantization() = default; + ClDequantize() = default; /** Set the input and output tensors. * * @param[in] compile_context The compile context to be used. @@ -45,10 +44,9 @@ public: * @param[out] dst Destination tensor info with the same dimensions of @p src. Data type 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 CLDequantizationLayer + /** 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 type supported: F16/F32. + * Similar to @ref ClDequantize::configure() * * @return a status */ @@ -59,4 +57,4 @@ public: }; } // namespace opencl } // namespace arm_compute -#endif /* ARM_COMPUTE_CL_DEQUANTIZATION_H */ +#endif /* ARM_COMPUTE_CL_DEQUANTIZE_H */ diff --git a/src/runtime/gpu/cl/operators/ClDequantization.cpp b/src/runtime/gpu/cl/operators/ClQuantize.cpp index df3203d2e1..92bbb62ba5 100644 --- a/src/runtime/gpu/cl/operators/ClDequantization.cpp +++ b/src/runtime/gpu/cl/operators/ClQuantize.cpp @@ -21,31 +21,30 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/runtime/gpu/cl/operators/ClDequantization.h" +#include "src/runtime/gpu/cl/operators/ClQuantize.h" #include "arm_compute/core/Error.h" #include "arm_compute/runtime/CL/CLScheduler.h" -#include "src/core/CL/kernels/CLFillBorderKernel.h" #include "src/core/gpu/cl/ClCompileContext.h" -#include "src/core/gpu/cl/kernels/ClDequantizationKernel.h" +#include "src/core/gpu/cl/kernels/ClQuantizeKernel.h" namespace arm_compute { namespace opencl { -void ClDequantization::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) +void ClQuantize::configure(const CLCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst) { - auto k = std::make_unique<kernels::ClDequantizationKernel>(); + auto k = std::make_unique<kernels::ClQuantizeKernel>(); k->configure(compile_context, src, dst); _kernel = std::move(k); } -Status ClDequantization::validate(const ITensorInfo *src, const ITensorInfo *dst) +Status ClQuantize::validate(const ITensorInfo *src, const ITensorInfo *dst) { - return kernels::ClDequantizationKernel::validate(src, dst); + return kernels::ClQuantizeKernel::validate(src, dst); } -void ClDequantization::run(ITensorPack &tensors) +void ClQuantize::run(ITensorPack &tensors) { ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided"); CLScheduler::get().enqueue_op(*_kernel.get(), tensors); diff --git a/src/runtime/gpu/cl/operators/ClQuantization.h b/src/runtime/gpu/cl/operators/ClQuantize.h index d938ff95a0..0b6d2c8cbe 100644 --- a/src/runtime/gpu/cl/operators/ClQuantization.h +++ b/src/runtime/gpu/cl/operators/ClQuantize.h @@ -21,10 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CL_QUANTIZATION_H -#define ARM_COMPUTE_CL_QUANTIZATION_H +#ifndef ARM_COMPUTE_CL_QUANTIZE_H +#define ARM_COMPUTE_CL_QUANTIZE_H -#include "arm_compute/core/KernelDescriptors.h" #include "src/core/gpu/cl/ClCompileContext.h" #include "src/runtime/gpu/cl/IClOperator.h" @@ -32,15 +31,12 @@ namespace arm_compute { namespace opencl { -/** Basic function to quantize a tensor. This function calls the following OpenCL kernel: - * - * -# @ref kernels::ClQuantizationKernel - */ -class ClQuantization : public IClOperator +/** Basic function to run @ref kernels::ClQuantizeKernel that dequantizes an input tensor */ +class ClQuantize : public IClOperator { public: /** Constructor */ - ClQuantization() = default; + ClQuantize() = default; /** Set the input and output tensors. * * @param[in] compile_context The compile context to be used. @@ -50,10 +46,9 @@ public: * @note Output auto initialization is not supported by this function */ 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 CLQuantizationLayer + /** Static function to check if given info will lead to a valid configuration * - * @param[in] src Input tensor info. The dimensions over the third will be interpreted as batches. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/32. - * @param[in] dst Output tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/QASYMM16. + * Similar to @ref ClQuantize::configure() * * @return a status */ @@ -63,5 +58,5 @@ public: void run(ITensorPack &tensors) override; }; } // namespace opencl -} //namespace arm_compute -#endif /* ARM_COMPUTE_CL_QUANTIZATION_H */ +} // namespace arm_compute +#endif /* ARM_COMPUTE_CL_QUANTIZE_H */ |