diff options
author | Tracy Narine <tracy.narine@arm.com> | 2023-07-13 16:50:54 +0100 |
---|---|---|
committer | Tracy Narine <tracy.narine@arm.com> | 2023-07-17 14:19:36 +0100 |
commit | bb8d7591a35bd95480b39001f8b7e41a6671f3a6 (patch) | |
tree | abf2871aa1bb86378f423df405164b0d4521db3f /src/armnnTfLiteParser/test | |
parent | 688268328c69e7d4181cdd31fe4717c80a6d1685 (diff) | |
download | armnn-bb8d7591a35bd95480b39001f8b7e41a6671f3a6.tar.gz |
IVGCVSW-7879 Change REVERSE_V2 from LayerWithParameters with 1 input, to Layer with 2 inputs
* Changing ReverseV2 to use two inputs
* This is required by the backends
* The ReverseV2Descriptor was removed
* Tests updated
* Added a Run<> templatefor inputs with different data types
Signed-off-by: Tracy Narine <tracy.narine@arm.com>
Change-Id: I22f947de829b4b3da6bda3a74f4ffdef4052cc25
Diffstat (limited to 'src/armnnTfLiteParser/test')
-rw-r--r-- | src/armnnTfLiteParser/test/ReverseV2.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/armnnTfLiteParser/test/ReverseV2.cpp b/src/armnnTfLiteParser/test/ReverseV2.cpp index 9604a3a1de..7dad19a40d 100644 --- a/src/armnnTfLiteParser/test/ReverseV2.cpp +++ b/src/armnnTfLiteParser/test/ReverseV2.cpp @@ -12,7 +12,6 @@ struct ReverseV2Fixture : public ParserFlatbuffersFixture explicit ReverseV2Fixture(const std::string& inputShape, const std::string& outputShape, const std::string& axisShape, - const std::string& axisData, const std::string& dataType = "FLOAT32", const std::string& scale = "1.0", const std::string& offset = "0") @@ -75,8 +74,8 @@ struct ReverseV2Fixture : public ParserFlatbuffersFixture } ], "buffers" : [ { }, - { "data": )" + axisData + R"(, }, { }, + { } ] } )"; @@ -86,15 +85,30 @@ struct ReverseV2Fixture : public ParserFlatbuffersFixture struct SimpleReverseV2Fixture : public ReverseV2Fixture { - SimpleReverseV2Fixture() : ReverseV2Fixture("[ 2, 2, 2 ]", "[ 2, 2, 2 ]", "[ 2 ]", "[ 0,0,0,0, 1,0,0,0 ]") {} + SimpleReverseV2Fixture() : ReverseV2Fixture("[ 2, 2, 2 ]", "[ 2, 2, 2 ]", "[ 2 ]" ) {} }; TEST_CASE_FIXTURE(SimpleReverseV2Fixture, "ParseReverseV2") { - RunTest<3, armnn::DataType::Float32> + RunTest<3, armnn::DataType::Float32, armnn::DataType::Signed32, armnn::DataType::Float32> (0, {{ "inputTensor", { 1, 2, 3, 4, 5, 6, 7, 8 }}}, + {{ "axis", { 0, 1 }}}, {{ "outputTensor", { 7, 8, 5, 6, 3, 4, 1, 2 }}}); } -}
\ No newline at end of file +struct SimpleReverseV2FixtureNegativeAxis : public ReverseV2Fixture +{ + SimpleReverseV2FixtureNegativeAxis() : ReverseV2Fixture("[ 2, 2, 2 ]", "[ 2, 2, 2 ]", "[ 1 ]" ) {} +}; + +TEST_CASE_FIXTURE(SimpleReverseV2FixtureNegativeAxis, "ParseReverseV2") +{ + RunTest<3, armnn::DataType::Float32, armnn::DataType::Signed32, armnn::DataType::Float32> + (0, + {{ "inputTensor", { 1, 2, 3, 4, 5, 6, 7, 8 }}}, + {{ "axis", { -1 }}}, + {{ "outputTensor", { 2, 1, 4, 3, 6, 5, 8, 7 }}}); +} + +} |