From 2542a267dc3dfe2b9148b3944977a6864ef3c558 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Thu, 19 Jan 2023 18:29:40 +0000 Subject: IVGCVSW-7453 Comparison does not Calculate its shape properly * Fixed issue where ComparisonLayer wasn't calculating its output shape correctly. Signed-off-by: Mike Kelly Change-Id: I37fe437b598bde694e519d6792182924bd0197cd --- src/armnn/test/ShapeInferenceTests.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/armnn/test/ShapeInferenceTests.cpp') diff --git a/src/armnn/test/ShapeInferenceTests.cpp b/src/armnn/test/ShapeInferenceTests.cpp index 333d12a3a2..7b5d73a4e5 100644 --- a/src/armnn/test/ShapeInferenceTests.cpp +++ b/src/armnn/test/ShapeInferenceTests.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -223,6 +223,26 @@ TEST_CASE("ComparisionTest") "comparision"); } +TEST_CASE("ComparisionTestSmallerRHS") +{ + ComparisonDescriptor descriptor; + descriptor.m_Operation = ComparisonOperation::Equal; + CreateGraphAndRunTest({{ 5, 7, 6, 2 }, { 1 }}, + {{ 5, 7, 6, 2 }}, + descriptor, + "comparision"); +} + +TEST_CASE("ComparisionTestSmallerLHS") +{ + ComparisonDescriptor descriptor; + descriptor.m_Operation = ComparisonOperation::Equal; + CreateGraphAndRunTest({{ 1 }, { 5, 7, 6, 2 }}, + {{ 5, 7, 6, 2 }}, + descriptor, + "comparision"); +} + TEST_CASE("ConcatTest") { ConcatDescriptor descriptor(2, 3); -- cgit v1.2.1