From a45abfd9ac805c8452c56172583dcf0dcf41f9db Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Mon, 17 Aug 2020 13:50:15 +0100 Subject: COMPMID-3687: Remove deprecated functions in 20.05 release Change-Id: I90e09e460b5d5d4f9ead8e3905833c5da3b9fbd6 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3762 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Sheri Zhang --- .../runtime/CL/functions/CLGEMMLowpOutputStage.h | 131 +-------------------- .../runtime/NEON/functions/NEGEMMLowpOutputStage.h | 53 --------- docs/00_introduction.dox | 5 + docs/06_functions_list.dox | 3 - src/runtime/CL/functions/CLGEMMLowpOutputStage.cpp | 80 +------------ .../NEON/functions/NEGEMMLowpOutputStage.cpp | 23 ---- 6 files changed, 7 insertions(+), 288 deletions(-) diff --git a/arm_compute/runtime/CL/functions/CLGEMMLowpOutputStage.h b/arm_compute/runtime/CL/functions/CLGEMMLowpOutputStage.h index 8f7a7c397e..c6e95888e5 100644 --- a/arm_compute/runtime/CL/functions/CLGEMMLowpOutputStage.h +++ b/arm_compute/runtime/CL/functions/CLGEMMLowpOutputStage.h @@ -38,76 +38,6 @@ namespace arm_compute { class ITensor; -/** Basic function to execute CLGEMMLowpQuantizeDownInt32ToUint8Scale on OpenCL. - * - * CLGEMMLowpQuantizeDownInt32ToUint8Scale depends on 3 parameters: result_offset, result_mult_int, result_shift - * The final result is: - * - * ((input[i][k] + result_offset) * result_mult_int) >> result_shift - * - * In case the bias tensor is provided, the final result is: - * - * ((input[i][k] + bias[k] + result_offset) * result_mult_int) >> result_shift - * - * This function calls the following OpenCL kernels: - * - * -# @ref CLGEMMLowpQuantizeDownInt32ScaleKernel - * - * @note The function accepts also 2 optional input arguments (min and max) which can be used to implement "rectified linear unit" activation functions - * after the result is shifted right by result_shift -*/ -class CLGEMMLowpQuantizeDownInt32ToUint8Scale : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output - * - * @param[in] input Input tensor. It is the output of @ref CLGEMMLowpMatrixMultiplyCore function. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[out] output Output tensor. Data type supported: QASYMM8 - * @param[in] result_offset Offset to be added to each element of the input matrix - * @param[in] result_mult_int Value to be multiplied to each element of the input matrix when once the result_offset has been add - * @param[in] result_shift Number of bits to shift right the result before converting back to QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_offset, int result_mult_int, int result_shift, int min = std::numeric_limits::lowest(), - int max = std::numeric_limits::max()); - /** Initialise the kernel's inputs, output - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Input tensor. It is the output of @ref CLGEMMLowpMatrixMultiplyCore function. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[out] output Output tensor. Data type supported: QASYMM8 - * @param[in] result_offset Offset to be added to each element of the input matrix - * @param[in] result_mult_int Value to be multiplied to each element of the input matrix when once the result_offset has been add - * @param[in] result_shift Number of bits to shift right the result before converting back to QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_offset, int result_mult_int, int result_shift, - int min = std::numeric_limits::lowest(), int max = std::numeric_limits::max()); - /** Static function to check if given info will lead to a valid configuration of @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale - * - * @param[in] input Input tensor. It is the output of @ref CLGEMMLowpMatrixMultiplyCore function. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[in] output Output tensor. Data type supported: QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - * - * @return a status - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits::lowest(), int max = std::numeric_limits::max()); -}; - /** Basic function to execute CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint on OpenCL. * * CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint depends on 3 parameters: @@ -264,65 +194,6 @@ public: static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits::lowest(), int max = std::numeric_limits::max()); }; -/** Basic function to execute CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat on OpenCL. - * - * This function calls the following OpenCL kernels: - * - * -# @ref CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel - * - * @note The function accepts also 2 optional input arguments (min and max) which can be used to implement "rectified linear unit" activation functions - * after the result is shifted right by result_shift -*/ -class CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output - * - * @param[in] input Input tensor. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[out] output Output tensor. Data type supported: QASYMM8 - * @param[in] multiplier Float multiplier to be multiplied to each element of the input matrix - * @param[in] offset Offset to be applied to result before converting it back to QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, float multiplier, int offset, int min = std::numeric_limits::lowest(), - int max = std::numeric_limits::max()); - /** Initialise the kernel's inputs, output - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Input tensor. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[out] output Output tensor. Data type supported: QASYMM8 - * @param[in] multiplier Float multiplier to be multiplied to each element of the input matrix - * @param[in] offset Offset to be applied to result before converting it back to QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, float multiplier, int offset, - int min = std::numeric_limits::lowest(), - int max = std::numeric_limits::max()); - /** Static function to check if given info will lead to a valid configuration of @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint - * - * @param[in] input Input tensor. It is the output of @ref CLGEMMLowpMatrixMultiplyCore function. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[in] output Output tensor. Data type supported: QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - * - * @return a status - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits::lowest(), int max = std::numeric_limits::max()); -}; /** Basic function to execute CLGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint on OpenCL. * * CLGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint depends on 2 parameters: @@ -442,4 +313,4 @@ public: static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo &info); }; } // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMLOWPOUTPUTSTAGE_H */ \ No newline at end of file +#endif /*ARM_COMPUTE_CLGEMMLOWPOUTPUTSTAGE_H */ diff --git a/arm_compute/runtime/NEON/functions/NEGEMMLowpOutputStage.h b/arm_compute/runtime/NEON/functions/NEGEMMLowpOutputStage.h index 486b9c6791..f29d5d464b 100644 --- a/arm_compute/runtime/NEON/functions/NEGEMMLowpOutputStage.h +++ b/arm_compute/runtime/NEON/functions/NEGEMMLowpOutputStage.h @@ -38,59 +38,6 @@ namespace arm_compute { class ITensor; -/** Basic function to execute NEGEMMLowpQuantizeDownInt32ToUint8Scale on NEON. - * - * NEGEMMLowpQuantizeDownInt32ToUint8Scale depends on 3 parameters: result_offset, result_mult_int, result_shift - * The final result is: - * - * ((input[i][k] + result_offset) * result_mult_int) >> result_shift - * - * In case the bias tensor is provided, the final result is: - * - * ((input[i][k] + bias[k] + result_offset) * result_mult_int) >> result_shift - * - * This function calls the following NEON kernels: - * - * -# @ref NEGEMMLowpQuantizeDownInt32ScaleKernel - * - * @note The function accepts also 2 optional input arguments (min and max) which can be used to implement "rectified linear unit" activation functions - * after the result is shifted right by result_shift -*/ -class NEGEMMLowpQuantizeDownInt32ToUint8Scale : public INESimpleFunctionNoBorder -{ -public: - /** Initialise the kernel's inputs, output - * - * @param[in] input Input tensor. It is the output of @ref NEGEMMLowpMatrixMultiplyCore function. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[out] output Output tensor. Data type supported: Data type supported: QASYMM8 - * @param[in] result_offset Offset to be added to each element of the input matrix - * @param[in] result_mult_int Value to be multiplied to each element of the input matrix when once the result_offset has been add - * @param[in] result_shift Number of bits to shift right the result before converting back to QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - void configure(const ITensor *input, const ITensor *bias, ITensor *output, int result_offset, int result_mult_int, int result_shift, int min = std::numeric_limits::lowest(), - int max = std::numeric_limits::max()); - /** Static function to check if given info will lead to a valid configuration of @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale - * - * @param[in] input Input tensor. It is the output of @ref NEGEMMLowpMatrixMultiplyCore function. Data type supported: S32 - * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required. - * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input. - * @param[in] output Output tensor. Data type supported: Data type supported: QASYMM8 - * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer. - * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8, - * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer. - * - * @return a status - */ - ARM_COMPUTE_DEPRECATED_REL(20.05) - static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits::lowest(), int max = std::numeric_limits::max()); -}; - /** Basic function to execute NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint on NEON. * * NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint depends on 3 parameters: diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox index c281cb21b7..35fff366c9 100644 --- a/docs/00_introduction.dox +++ b/docs/00_introduction.dox @@ -257,6 +257,11 @@ v20.08 Public major release - graph_yolov3_output_detector - Removed padding from: - @ref NEPixelWiseMultiplicationKernel + - Removedd OpenCL kernels / functions: + - CLGEMMLowpQuantizeDownInt32ToUint8Scale + - CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat + - Removed NEON kernels / functions: + - NEGEMMLowpQuantizeDownInt32ToUint8Scale - GEMMTuner improvements: - Added fp16 support - Output json files for easier integration diff --git a/docs/06_functions_list.dox b/docs/06_functions_list.dox index 4a7c9fac6a..99eab12f8f 100644 --- a/docs/06_functions_list.dox +++ b/docs/06_functions_list.dox @@ -91,7 +91,6 @@ namespace arm_compute - @ref NEFullyConnectedLayerReshapeWeights - @ref NEGather - @ref NEGEMMInterleave4x4 - - @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint - @ref NEGEMMTranspose1xW @@ -297,10 +296,8 @@ namespace arm_compute - @ref CLFullyConnectedLayerReshapeWeights - @ref CLGather - @ref CLGaussian3x3 - - @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint - @ref CLGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint - - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat - @ref CLMagnitude - @ref CLMeanStdDevNormalizationLayer - @ref CLMedian3x3 diff --git a/src/runtime/CL/functions/CLGEMMLowpOutputStage.cpp b/src/runtime/CL/functions/CLGEMMLowpOutputStage.cpp index d27b764a3d..a499e1858d 100644 --- a/src/runtime/CL/functions/CLGEMMLowpOutputStage.cpp +++ b/src/runtime/CL/functions/CLGEMMLowpOutputStage.cpp @@ -33,45 +33,6 @@ namespace arm_compute { -void CLGEMMLowpQuantizeDownInt32ToUint8Scale::configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_offset, int result_mult_int, int result_shift, int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_offset = result_offset; - info.gemmlowp_multiplier = result_mult_int; - info.gemmlowp_shift = result_shift; - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - auto k = arm_compute::support::cpp14::make_unique(); - k->configure(CLKernelLibrary::get().get_compile_context(), input, bias, output, &info); - _kernel = std::move(k); -} - -void CLGEMMLowpQuantizeDownInt32ToUint8Scale::configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_offset, - int result_mult_int, - int result_shift, int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_offset = result_offset; - info.gemmlowp_multiplier = result_mult_int; - info.gemmlowp_shift = result_shift; - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - auto k = arm_compute::support::cpp14::make_unique(); - k->configure(compile_context, input, bias, output, &info); - _kernel = std::move(k); -} - -Status CLGEMMLowpQuantizeDownInt32ToUint8Scale::validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - return CLGEMMLowpQuantizeDownInt32ScaleKernel::validate(input, bias, output, &info); -} - void CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint::configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift, int min, int max) @@ -118,45 +79,6 @@ Status CLGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint::validate(const ITenso return CLGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPointKernel::validate(input, bias, output, min, max); } -void CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat::configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, - float multiplier, int offset, - int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_offset = offset; - info.gemmlowp_real_multiplier = multiplier; - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - auto k = arm_compute::support::cpp14::make_unique(); - k->configure(CLKernelLibrary::get().get_compile_context(), input, bias, output, &info); - _kernel = std::move(k); -} - -void CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat::configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, - float multiplier, int offset, - int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_offset = offset; - info.gemmlowp_real_multiplier = multiplier; - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - auto k = arm_compute::support::cpp14::make_unique(); - k->configure(compile_context, input, bias, output, &info); - _kernel = std::move(k); -} - -Status CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFloat::validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, - int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - return CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::validate(input, bias, output, &info); -} - void CLGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint::configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, int result_fixedpoint_multiplier, int result_shift, int min, int max) @@ -268,4 +190,4 @@ Status CLGEMMLowpOutputStage::validate(const ITensorInfo *input, const ITensorIn return ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Unsupported GEMMLowpOutputStage type."); } } -} // namespace arm_compute \ No newline at end of file +} // namespace arm_compute diff --git a/src/runtime/NEON/functions/NEGEMMLowpOutputStage.cpp b/src/runtime/NEON/functions/NEGEMMLowpOutputStage.cpp index ed9b449629..239a8e668a 100644 --- a/src/runtime/NEON/functions/NEGEMMLowpOutputStage.cpp +++ b/src/runtime/NEON/functions/NEGEMMLowpOutputStage.cpp @@ -33,29 +33,6 @@ namespace arm_compute { -void NEGEMMLowpQuantizeDownInt32ToUint8Scale::configure(const ITensor *input, const ITensor *bias, ITensor *output, int result_offset, int result_mult_int, int result_shift, int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_offset = result_offset; - info.gemmlowp_multiplier = result_mult_int; - info.gemmlowp_shift = result_shift; - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - auto k = arm_compute::support::cpp14::make_unique(); - k->configure(input, bias, output, &info); - _kernel = std::move(k); -} - -Status NEGEMMLowpQuantizeDownInt32ToUint8Scale::validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min, int max) -{ - GEMMLowpOutputStageInfo info = GEMMLowpOutputStageInfo(); - info.gemmlowp_min_bound = min; - info.gemmlowp_max_bound = max; - - return NEGEMMLowpQuantizeDownInt32ScaleKernel::validate(input, bias, output, &info); -} - void NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint::configure(const ITensor *input, const ITensor *bias, ITensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift, int min, int max) { -- cgit v1.2.1