aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-02-20 11:16:57 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-02-20 15:20:58 +0000
commitec96d6c5e80d8db15b5760c6770f02b9f2974b6a (patch)
treeae61666f2b5789049c6be4c0a0bb0a09c5e082cb
parent2607ba1261b309029603377dea80e71fcc0f5ee4 (diff)
downloadComputeLibrary-ec96d6c5e80d8db15b5760c6770f02b9f2974b6a.tar.gz
COMPMID-1710: Fix DepthConcatenate reference with different quantization
Change-Id: If154fcc383039bf7a7ad46d4110067c45b922707 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/737 Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--tests/validation/reference/DepthConcatenateLayer.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/validation/reference/DepthConcatenateLayer.cpp b/tests/validation/reference/DepthConcatenateLayer.cpp
index f0dab3baac..139675d108 100644
--- a/tests/validation/reference/DepthConcatenateLayer.cpp
+++ b/tests/validation/reference/DepthConcatenateLayer.cpp
@@ -45,13 +45,17 @@ SimpleTensor<T> depthconcatenate_layer(const std::vector<SimpleTensor<T>> &srcs,
}
// Compute reference
- int depth_offset = 0;
- const int width_out = dst.shape().x();
- const int height_out = dst.shape().y();
- const int depth_out = dst.shape().z();
- const int out_stride_z = width_out * height_out;
- const int batches = dst.shape().total_size_upper(3);
- if(srcs[0].data_type() == DataType::QASYMM8 && srcs[0].quantization_info() != dst.quantization_info())
+ int depth_offset = 0;
+ const int width_out = dst.shape().x();
+ const int height_out = dst.shape().y();
+ const int depth_out = dst.shape().z();
+ const int out_stride_z = width_out * height_out;
+ const int batches = dst.shape().total_size_upper(3);
+ auto have_different_quantization_info = [&](const SimpleTensor<T> &tensor)
+ {
+ return tensor.quantization_info() != dst.quantization_info();
+ };
+ if(srcs[0].data_type() == DataType::QASYMM8 && std::any_of(srcs.cbegin(), srcs.cend(), have_different_quantization_info))
{
for(int b = 0; b < batches; ++b)
{