From 422f2fb6c7ef13e48124991af6f27e78934b8ece Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Mon, 21 Oct 2019 14:09:11 +0100 Subject: IVGCVSW-3996 Add deserialization test for ComparisonLayer * Added DeserializeComparison.cpp that contains float32 and quantized deserialization test cases for all comparison operations * Removed DeserializeEqual.cpp and DeserializeGreater.cpp, as they have become redundant Signed-off-by: Aron Virginas-Tar Change-Id: I9577168721e1bc6bcc5bb2b35edf82390a816597 --- src/armnnDeserializer/test/DeserializeEqual.cpp | 148 ------------------------ 1 file changed, 148 deletions(-) delete mode 100644 src/armnnDeserializer/test/DeserializeEqual.cpp (limited to 'src/armnnDeserializer/test/DeserializeEqual.cpp') diff --git a/src/armnnDeserializer/test/DeserializeEqual.cpp b/src/armnnDeserializer/test/DeserializeEqual.cpp deleted file mode 100644 index 7d8213cd95..0000000000 --- a/src/armnnDeserializer/test/DeserializeEqual.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include -#include "ParserFlatbuffersSerializeFixture.hpp" -#include "../Deserializer.hpp" - -#include -#include - -BOOST_AUTO_TEST_SUITE(Deserializer) - -struct EqualFixture : public ParserFlatbuffersSerializeFixture -{ - explicit EqualFixture(const std::string & inputShape1, - const std::string & inputShape2, - const std::string & outputShape, - const std::string & dataType) - { - m_JsonString = R"( - { - inputIds: [0, 1], - outputIds: [3], - layers: [ - { - layer_type: "InputLayer", - layer: { - base: { - layerBindingId: 0, - base: { - index: 0, - layerName: "InputLayer1", - layerType: "Input", - inputSlots: [{ - index: 0, - connection: {sourceLayerIndex:0, outputSlotIndex:0 }, - }], - outputSlots: [{ - index: 0, - tensorInfo: { - dimensions: )" + inputShape1 + R"(, - dataType: )" + dataType + R"( - }, - }], - }, - } - }, - }, - { - layer_type: "InputLayer", - layer: { - base: { - layerBindingId: 1, - base: { - index:1, - layerName: "InputLayer2", - layerType: "Input", - inputSlots: [{ - index: 0, - connection: {sourceLayerIndex:0, outputSlotIndex:0 }, - }], - outputSlots: [{ - index: 0, - tensorInfo: { - dimensions: )" + inputShape2 + R"(, - dataType: )" + dataType + R"( - }, - }], - }, - } - }, - }, - { - layer_type: "EqualLayer", - layer: { - base: { - index:2, - layerName: "EqualLayer", - layerType: "Equal", - inputSlots: [{ - index: 0, - connection: {sourceLayerIndex:0, outputSlotIndex:0 }, - }, - { - index: 1, - connection: {sourceLayerIndex:1, outputSlotIndex:0 }, - }], - outputSlots: [{ - index: 0, - tensorInfo: { - dimensions: )" + outputShape + R"(, - dataType: Boolean - }, - }], - } - }, - }, - { - layer_type: "OutputLayer", - layer: { - base:{ - layerBindingId: 0, - base: { - index: 3, - layerName: "OutputLayer", - layerType: "Output", - inputSlots: [{ - index: 0, - connection: {sourceLayerIndex:2, outputSlotIndex:0 }, - }], - outputSlots: [{ - index: 0, - tensorInfo: { - dimensions: )" + outputShape + R"(, - dataType: Boolean - }, - }], - } - } - }, - } - ] - } - )"; - Setup(); - } -}; - -struct SimpleEqualFixture : EqualFixture -{ - SimpleEqualFixture() : EqualFixture("[ 2, 2, 2, 1 ]", - "[ 2, 2, 2, 1 ]", - "[ 2, 2, 2, 1 ]", - "QuantisedAsymm8") {} -}; - -BOOST_FIXTURE_TEST_CASE(EqualQuantisedAsymm8, SimpleEqualFixture) -{ - RunTest<4, armnn::DataType::QuantisedAsymm8, armnn::DataType::Boolean>( - 0, - {{"InputLayer1", { 0, 1, 2, 3, 4, 5, 6, 7 }}, - {"InputLayer2", { 0, 0, 0, 3, 0, 0, 6, 7 }}}, - {{"OutputLayer", { 1, 0, 0, 1, 0, 0, 1, 1 }}}); -} - -BOOST_AUTO_TEST_SUITE_END() -- cgit v1.2.1