diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-09-30 13:56:17 +0100 |
---|---|---|
committer | Giorgio Arena <giorgio.arena@arm.com> | 2021-10-05 10:46:45 +0000 |
commit | 41d886cecd6478725e9d0da93af7de5847efca1e (patch) | |
tree | fbaec1e2142da5d2e8ab0b1b9ab9c98afd3436f4 /src/core/NEON/kernels/arm_conv/depthwise | |
parent | 2c5ae8604ca03f7eee3991f5f94afdf023e5c842 (diff) | |
download | ComputeLibrary-41d886cecd6478725e9d0da93af7de5847efca1e.tar.gz |
Fixed the compiler warning -Werror=type-limits
* Comparison is always false due to limited range of data type.
rescale_value is truncated to int32_t and then is compared agains (1ll <<31) which will be always false
* Resolves MLCE-508
Change-Id: I252f64d4aec8f3e120d71fc5e40c7665816173ac
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6342
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/depthwise')
-rw-r--r-- | src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp index 8d1a8698c3..57fa11151b 100644 --- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp +++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp @@ -275,11 +275,11 @@ class DepthwiseDepthfirst : public DepthwiseCommon<TInput, TWeight, TOutput> for (int start_out_j = 0; start_out_j < static_cast<int>(output_width);) { const int start_in_j = start_out_j * m_strat->get_stride_cols() - this->m_args.padding.left; - const int pad_left = -std::min(0, start_in_j); + int pad_left = std::min(0, start_in_j); // Compute how many output tiles we can compute with the direct kernel. int n_direct_tiles = 0; - if (!pad_top && !pad_bottom && !pad_left) + if (!pad_top && !pad_bottom && !pad_left) { // Determine the maximum number of tiles we could handle. n_direct_tiles = (output_width - start_out_j) / m_strat->get_output_cols(); @@ -323,7 +323,7 @@ class DepthwiseDepthfirst : public DepthwiseCommon<TInput, TWeight, TOutput> end_out_j - start_out_j, static_cast<int>(output_width) - start_out_j ); - + pad_left *= -1; // Construct the input pointer array - fill the array with pointers to // the input buffer and then fill in the required values. for (auto i = pad_top; i < m_strat->get_input_rows() - pad_bottom; i++) |