aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/CPP
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-11-29 14:27:24 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:41:36 +0000
commit6fdfaa856b1eb69d6afbef5727b99756912fc6fa (patch)
tree1f1b916fc94a140ec16090a638f9d0531032d9bb /tests/validation/CPP
parent47b5603a0db2797dda66a2b5dbbc451a740a5ecd (diff)
downloadComputeLibrary-6fdfaa856b1eb69d6afbef5727b99756912fc6fa.tar.gz
COMPMID-713: Address failures in OCLGrind for CLDirectConvolution
-Changes way of clamping in the kernel side. -Fills padding with quantized values Change-Id: I94d17c341fd637fbb24390722162b551b62d16cb Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111114 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/CPP')
-rw-r--r--tests/validation/CPP/ConvolutionLayer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/validation/CPP/ConvolutionLayer.cpp b/tests/validation/CPP/ConvolutionLayer.cpp
index a767912879..3884a930a2 100644
--- a/tests/validation/CPP/ConvolutionLayer.cpp
+++ b/tests/validation/CPP/ConvolutionLayer.cpp
@@ -210,8 +210,7 @@ void convolution3d(const SimpleTensor<uint8_t> &in, const SimpleTensor<uint8_t>
acc = asymm_rounding_divide_by_pow2(asymm_int_mult(acc, output_multiplier), output_shift);
acc += output_offset;
- acc = std::max<int32_t>(acc, 0);
- acc = std::min<int32_t>(acc, 255);
+ acc = clamp<int32_t>(acc, 0, 255);
// Store the result
*out_ptr = acc;