diff options
author | Ramy Elgammal <ramy.elgammal@arm.com> | 2022-11-18 16:03:21 +0000 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2022-11-22 11:43:47 +0000 |
commit | ca1a52d14551147456a9a1ea2e24f5c141a6d80e (patch) | |
tree | ec67cfb4ecf82d00719040f8edc517632661f69b /tests | |
parent | d2475c721ef892c6522d43edcc67a6710de8039b (diff) | |
download | ComputeLibrary-ca1a52d14551147456a9a1ea2e24f5c141a6d80e.tar.gz |
space-to-depth shape calculator fix
Resolves: ARMCL-592
Change-Id: If036a2b6d2842db2ed750e9d350bfaa3f7a76c9e
Signed-off-by: Ramy Elgammal <ramy.elgammal@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8668
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/validation/fixtures/SpaceToDepthFixture.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/validation/fixtures/SpaceToDepthFixture.h b/tests/validation/fixtures/SpaceToDepthFixture.h index 7448ec546b..0776e495eb 100644 --- a/tests/validation/fixtures/SpaceToDepthFixture.h +++ b/tests/validation/fixtures/SpaceToDepthFixture.h @@ -24,6 +24,7 @@ #ifndef ARM_COMPUTE_TEST_SPACE_TO_DEPTH_LAYER_FIXTURE #define ARM_COMPUTE_TEST_SPACE_TO_DEPTH_LAYER_FIXTURE +#include "arm_compute/core/utils/misc/ShapeCalculator.h" #include "tests/Globals.h" #include "tests/framework/Asserts.h" #include "tests/framework/Fixture.h" @@ -69,6 +70,12 @@ protected: TensorType input = create_tensor<TensorType>(input_shape, data_type, 1, QuantizationInfo(), data_layout); TensorType output = create_tensor<TensorType>(output_shape, data_type, 1, QuantizationInfo(), data_layout); + auto calc_out_shape = misc::shape_calculator::compute_space_to_depth_shape(input.info(), block_shape); + ARM_COMPUTE_ASSERT(output_shape[0] == calc_out_shape[0]); + ARM_COMPUTE_ASSERT(output_shape[1] == calc_out_shape[1]); + ARM_COMPUTE_ASSERT(output_shape[2] == calc_out_shape[2]); + ARM_COMPUTE_ASSERT(output_shape[3] == calc_out_shape[3]); + // Create and configure function FunctionType space_to_depth; space_to_depth.configure(&input, &output, block_shape); |