aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/DepthConcatenateLayer.cpp
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 13:05:33 +0000
commit8c8b74887ee0946694fb6ebc98515944d70af9f9 (patch)
tree9d1a3410c88002448039c6ac2d20e7a3c65abf85 /tests/validation/reference/DepthConcatenateLayer.cpp
parent2481d468415a77b42ea269189b0c2dc8be68af98 (diff)
downloadComputeLibrary-8c8b74887ee0946694fb6ebc98515944d70af9f9.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>
Diffstat (limited to 'tests/validation/reference/DepthConcatenateLayer.cpp')
-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)
{