aboutsummaryrefslogtreecommitdiff
path: root/include/armnnTestUtils
diff options
context:
space:
mode:
authorTianle Cheng <tianle.cheng@arm.com>2023-06-28 13:20:47 +0100
committerTianle Cheng <tianle.cheng@arm.com>2023-07-04 10:36:43 +0000
commit988354de127528bdebb98fd25661fbf2f39f17dd (patch)
treec06f5250bdd0182055ac9e84e20d6e338518ad08 /include/armnnTestUtils
parent9414936e62ed8cd18cc33c0390bb605a782556c6 (diff)
downloadarmnn-988354de127528bdebb98fd25661fbf2f39f17dd.tar.gz
IVGCVSW-7831: Front end and Reference Implementation for REVERSE_V2
* Descriptors added for ReverseV2 * Layer definition added * Input validation added * Reference workload implementation for ReverseV2 added * Reference layer unit tests made for ReverseV2 * CompareTensors method updated to support comparison between empty tensors * CMake and other build files updated Signed-off-by: Tianle Cheng <tianle.cheng@arm.com> Change-Id: I805738454421309fda77c44218a8df171d68dc18
Diffstat (limited to 'include/armnnTestUtils')
-rw-r--r--include/armnnTestUtils/TensorHelpers.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/armnnTestUtils/TensorHelpers.hpp b/include/armnnTestUtils/TensorHelpers.hpp
index ca17e621c3..fa9c97032c 100644
--- a/include/armnnTestUtils/TensorHelpers.hpp
+++ b/include/armnnTestUtils/TensorHelpers.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017, 2021-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
@@ -88,6 +88,13 @@ armnn::PredicateResult CompareTensors(const std::vector<T>& actualData,
return res;
}
+ // Support for comparison between empty tensors
+ if (actualData.size() == 0 && expectedData.size() == 0)
+ {
+ armnn::PredicateResult comparisonResult(true);
+ return comparisonResult;
+ }
+
if (actualShape.GetNumDimensions() != expectedShape.GetNumDimensions())
{
armnn::PredicateResult res(false);