aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfParser/test
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2020-06-29 16:27:03 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2020-07-01 08:26:47 +0000
commit526647333571169076f5e72c9fb18c71025bf7c0 (patch)
tree6dc559a7b0fae3705172b09a88fa552926652040 /src/armnnTfParser/test
parentcbd2c230b7ce5f26e2ccccf36b7ad450f6e1ad09 (diff)
downloadarmnn-526647333571169076f5e72c9fb18c71025bf7c0.tar.gz
IVGCVSW-4903 Connect axis parameter in Gather from android to ACL.
!android-nn-driver:3302 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ifbc49acb5272f8a36719bb68676e44817190537d
Diffstat (limited to 'src/armnnTfParser/test')
-rw-r--r--src/armnnTfParser/test/Gather.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/armnnTfParser/test/Gather.cpp b/src/armnnTfParser/test/Gather.cpp
index 8c4b891141..ab5fb7104d 100644
--- a/src/armnnTfParser/test/Gather.cpp
+++ b/src/armnnTfParser/test/Gather.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -38,7 +38,8 @@ struct GatherFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::I
const armnn::TensorShape& inputShape1,
const std::vector<int>& input1Content,
const std::vector<int>& input0Dims,
- const std::vector<int>& input1Dims)
+ const std::vector<int>& input1Dims,
+ int axis = 0)
{
m_Prototext = R"(
node {
@@ -56,6 +57,7 @@ node {
shape {
)";
dimsHelper(input0Dims, m_Prototext);
+
m_Prototext.append(R"(
}
}
@@ -78,6 +80,7 @@ node {
tensor_shape {
)");
dimsHelper(input1Dims, m_Prototext);
+
m_Prototext.append(R"(
}
tensor_content: ")");
@@ -104,8 +107,18 @@ node {
type: DT_FLOAT
}
}
+ attr {
+ key: "axis"
+ value {
+ i: )");
+ m_Prototext += std::to_string(axis);
+
+ m_Prototext.append(R"(
+ }
+ }
}
)");
+
Setup({ { "input0", inputShape0 },
{ "input1", inputShape1 } },
{ "output" });
@@ -121,7 +134,8 @@ struct GatherFixture1DParams1DIndices : public GatherFixture
{ 4, 0, 0, 0 },
{ 0, 2, 1, 3 },
{ 4 },
- { 4 }) {}
+ { 4 },
+ 0) {}
};
struct GatherFixture1DParamsMultiDimIndices : public GatherFixture
@@ -131,7 +145,8 @@ struct GatherFixture1DParamsMultiDimIndices : public GatherFixture
{ 2, 2, 1, 1 },
{ 0, 1, 1, 3 },
{ 4 },
- { 2, 2 }) {}
+ { 2, 2 },
+ 0) {}
};
struct GatherFixtureMultiDimParamMultiDimIndices : public GatherFixture
@@ -141,7 +156,8 @@ struct GatherFixtureMultiDimParamMultiDimIndices : public GatherFixture
{ 2, 1, 4 },
{ 1, 3, 0, 2 },
{ 5, 2 },
- { 2, 2 }) {}
+ { 2, 2 },
+ 0) {}
};
BOOST_FIXTURE_TEST_CASE(ParseGather1DParams1DIndices, GatherFixture1DParams1DIndices)