diff options
author | Omar Al Khatib <omar.alkhatib@arm.com> | 2023-03-28 11:14:29 +0100 |
---|---|---|
committer | Omar Al Khatib <omar.alkhatib@arm.com> | 2023-04-03 08:08:47 +0000 |
commit | fff9a4cb56d3d3dbfe85db555eea4bc9b3143996 (patch) | |
tree | 5b567a9ee004560fbb5eeda0bd803d1a6397fd4f /src/runtime/CL/functions | |
parent | 1fad9f27bfc9da711e216bd80eef60bb68d9cb86 (diff) | |
download | ComputeLibrary-fff9a4cb56d3d3dbfe85db555eea4bc9b3143996.tar.gz |
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 <omar.alkhatib@arm.com>
Change-Id: Ic67d44a6a39299ecdafc507f12e3dc5d517dfb62
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9385
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions')
-rw-r--r-- | src/runtime/CL/functions/CLBatchToSpaceLayer.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp b/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp index d4342b456f..d7a409128d 100644 --- a/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp +++ b/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp @@ -43,14 +43,14 @@ CLBatchToSpaceLayer::CLBatchToSpaceLayer() CLBatchToSpaceLayer::~CLBatchToSpaceLayer() = default; -void CLBatchToSpaceLayer::configure(const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output, const CropInfo &crop_info) +void CLBatchToSpaceLayer::configure(const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output) { - configure(CLKernelLibrary::get().get_compile_context(), input, block_shape, output, crop_info); + ARM_COMPUTE_LOG_PARAMS(input, block_shape, output); + _batch_to_space_kernel->configure(CLKernelLibrary::get().get_compile_context(), input, block_shape, output); } -void CLBatchToSpaceLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output, const CropInfo &crop_info) +void CLBatchToSpaceLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output) { - ARM_COMPUTE_UNUSED(crop_info); ARM_COMPUTE_LOG_PARAMS(input, block_shape, output); _batch_to_space_kernel->configure(compile_context, input, block_shape, output); } @@ -62,21 +62,18 @@ void CLBatchToSpaceLayer::configure(const ICLTensor *input, int32_t block_shape_ void CLBatchToSpaceLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, int32_t block_shape_x, int32_t block_shape_y, ICLTensor *output, const CropInfo &crop_info) { - ARM_COMPUTE_UNUSED(crop_info); ARM_COMPUTE_LOG_PARAMS(input, block_shape_x, block_shape_y, output); - _batch_to_space_kernel->configure(compile_context, input, block_shape_x, block_shape_y, output); + _batch_to_space_kernel->configure(compile_context, input, block_shape_x, block_shape_y, output, crop_info); } -Status CLBatchToSpaceLayer::validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output, const CropInfo &crop_info) +Status CLBatchToSpaceLayer::validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output) { - ARM_COMPUTE_UNUSED(crop_info); return CLBatchToSpaceLayerKernel::validate(input, block_shape, output); } Status CLBatchToSpaceLayer::validate(const ITensorInfo *input, int32_t block_shape_x, int32_t block_shape_y, const ITensorInfo *output, const CropInfo &crop_info) { - ARM_COMPUTE_UNUSED(crop_info); - return CLBatchToSpaceLayerKernel::validate(input, block_shape_x, block_shape_y, output); + return CLBatchToSpaceLayerKernel::validate(input, block_shape_x, block_shape_y, output, crop_info); } void CLBatchToSpaceLayer::run() |