aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/utils/misc
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-09-18 18:38:37 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit041f36d4dc1b6473d9f7136659a384d611fab0b6 (patch)
tree01a337d08f5c8f5382eddc29585608e612cc272d /arm_compute/core/utils/misc
parentceb889efc302464efd7fd20001d8a89a06c4e0bd (diff)
downloadComputeLibrary-041f36d4dc1b6473d9f7136659a384d611fab0b6.tar.gz
COMPMID-1446 : Add support for 3D output in NEGEMMLowpOutputStage
Change-Id: I61e7d39d09a9936b1128ec04038fa2d8dfe6a2c8 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/149211 Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/utils/misc')
-rw-r--r--arm_compute/core/utils/misc/ShapeCalculator.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h
index 1fdf5b8ff5..b4ab10c56c 100644
--- a/arm_compute/core/utils/misc/ShapeCalculator.h
+++ b/arm_compute/core/utils/misc/ShapeCalculator.h
@@ -513,6 +513,21 @@ inline TensorShape compute_mm_shape(const ITensorInfo &input0, const ITensorInfo
return output_shape;
}
+inline TensorShape compute_output_stage_shape(const ITensorInfo &input, unsigned int gemm_3d_depth = 1)
+{
+ ARM_COMPUTE_ERROR_ON(input.data_layout() != DataLayout::NHWC && gemm_3d_depth > 1);
+
+ TensorShape output_shape = input.tensor_shape();
+ if(gemm_3d_depth > 1)
+ {
+ output_shape.set(0, input.tensor_shape().x());
+ output_shape.set(1, input.tensor_shape().y() / gemm_3d_depth);
+ output_shape.set(2, gemm_3d_depth);
+ }
+
+ return output_shape;
+}
+
inline TensorShape compute_strided_slice_shape(const ITensorInfo &input,
const Coordinates &starts, const Coordinates &ends, const Coordinates &strides,
int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)