From fff9a4cb56d3d3dbfe85db555eea4bc9b3143996 Mon Sep 17 00:00:00 2001 From: Omar Al Khatib Date: Tue, 28 Mar 2023 11:14:29 +0100 Subject: Add Cropping to CLBatchToSpace - Deprecate dynamic block shape interface - Iterate over output window instead of input window for simpler implementation and better performance. - Add cropping support and cropping tests Resolves [COMPMID-5865] Signed-off-by: Omar Al Khatib Change-Id: Ic67d44a6a39299ecdafc507f12e3dc5d517dfb62 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9385 Comments-Addressed: Arm Jenkins Reviewed-by: SiCong Li Tested-by: Arm Jenkins Benchmark: Arm Jenkins --- arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h b/arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h index 4b7cb60bc1..861330b9d4 100644 --- a/arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h +++ b/arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h @@ -67,18 +67,22 @@ public: * @param[in] input Tensor input. Supported tensor rank: 4. Data types supported: All. * @param[in] block_shape 1-D tensor with shape [M]. Data types supported: S32 * @param[out] output Tensor output. Data types supported: same as @p input - * @param[in] crop_info Information about how the output shape is cropped after batch to space is performed + * + * @deprecated This method for dynamic block shape is not fully mature and will be removed in 23.08 release */ - void configure(const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output, const CropInfo &crop_info = CropInfo{}); + ARM_COMPUTE_DEPRECATED_REL(23.05) + void configure(const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output); /** Set the input and output tensors. * * @param[in] compile_context The compile context to be used. * @param[in] input Tensor input. Supported tensor rank: 4. Data types supported: All. * @param[in] block_shape 1-D tensor with shape [M]. Data types supported: S32 * @param[out] output Tensor output. Data types supported: same as @p input - * @param[in] crop_info Information about how the output shape is cropped after batch to space is performed + * + * @deprecated This method for dynamic block shape is not fully mature and will be removed in 23.08 release */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output, const CropInfo &crop_info = CropInfo{}); + ARM_COMPUTE_DEPRECATED_REL(23.05) + void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output); /** Set the input and output tensors. (Static block shape). * * @param[in] input Tensor input. Supported tensor rank: 4. Data types supported: All. @@ -103,11 +107,13 @@ public: * @param[in] input Tensor input info. Supported tensor rank: 4. Data types supported: All. * @param[in] block_shape block shape tensor info with shape [M]. Data types supported: S32 * @param[out] output Tensor output info. Data types supported: same as @p input - * @param[in] crop_info Information about how the output shape is cropped after batch to space is performed * * @return a status + * + * @deprecated This method for dynamic block shape is not fully mature and will be removed in 23.08 release */ - static Status validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output, const CropInfo &crop_info = CropInfo{}); + ARM_COMPUTE_DEPRECATED_REL(23.05) + static Status validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output); /** Static function to check if given info will lead to a valid configuration of @ref CLBatchToSpaceLayer (Static block shape). * * @param[in] input Tensor input info. Supported tensor rank: 4. Data types supported: All. -- cgit v1.2.1