From dcd949d8c71d879ff656c13d068e8af3dd31eef1 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 17 Apr 2019 11:04:28 +0100 Subject: COMPMID-1995: Fix release builds Forces checks in calculate_concatenate_shape to be performed when asserts are enabled Change-Id: I04e08894f8118a65147e2fdf34cb4d2e75e76273 Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/1001 Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- arm_compute/core/utils/misc/ShapeCalculator.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index f5058b35fb..26b337d5c5 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -1204,6 +1204,7 @@ inline TensorShape calculate_concatenate_shape(const std::vector &input, si { TensorShape out_shape = extract_shape(input[0]); +#if defined(ARM_COMPUTE_ASSERTS_ENABLED) // All dimensions must match except the axis one for(unsigned int i = 0; i < MAX_DIMS; ++i) { @@ -1219,6 +1220,7 @@ inline TensorShape calculate_concatenate_shape(const std::vector &input, si ARM_COMPUTE_ERROR_ON(out_shape[i] != shape[i]); } } +#endif // defined(ARM_COMPUTE_ASSERTS_ENABLED) // Calculate output shape size_t new_size = 0; -- cgit v1.2.1