COMPMID-2919 add error message for zero stride values

The error message is added to function computing padding
requirements.

Change-Id: I2869577e587dbb8153b5abca4d63f3ba999e7e2f
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2305
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp
index 9f1255d..cbf6e48 100644
--- a/src/core/Utils.cpp
+++ b/src/core/Utils.cpp
@@ -340,13 +340,15 @@
 PadStrideInfo arm_compute::calculate_same_pad(TensorShape input_shape, TensorShape weights_shape, PadStrideInfo conv_info, DataLayout data_layout, const Size2D &dilation,
                                               const DimensionRoundingType &rounding_type)
 {
+    const auto &strides = conv_info.stride();
+    ARM_COMPUTE_ERROR_ON_MSG((strides.first < 1 || strides.second < 1), "Stride values should be greater than or equal to 1.");
+
     const unsigned int width_idx     = arm_compute::get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH);
     const unsigned int height_idx    = arm_compute::get_data_layout_dimension_index(data_layout, DataLayoutDimension::HEIGHT);
     const unsigned int in_width      = input_shape[width_idx];
     const unsigned int in_height     = input_shape[height_idx];
     const unsigned int kernel_width  = weights_shape[width_idx];
     const unsigned int kernel_height = weights_shape[height_idx];
-    const auto        &strides       = conv_info.stride();
 
     // Calculate output dimensions
     const auto         is_ceil    = static_cast<unsigned int>(rounding_type == DimensionRoundingType::CEIL);