aboutsummaryrefslogtreecommitdiff
path: root/src/armnnOnnxParser/test/OnnxParserTestUtils.hpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2021-09-17 21:08:57 +0100
committerJim Flynn <jim.flynn@arm.com>2021-09-24 14:17:31 +0000
commitf10b15a8946f39bdf3f60cebc59d2963069eedca (patch)
tree9cba39db69acad2bd5728cefbad578161e6ba63c /src/armnnOnnxParser/test/OnnxParserTestUtils.hpp
parent4fcc8632aaa64e683d98199659093d1aa99ffb08 (diff)
downloadarmnn-f10b15a8946f39bdf3f60cebc59d2963069eedca.tar.gz
IVGCVSW-6382 Add Gather operator support to ONNX parser
* Add ParseGather to support Gather operator on ONNX * Add Support of int64 converted to int32 for constant * Add OnnxParserTestUtils * Refactor ValidateTensorShapesFromInputs of GatherLayer * Unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ie9dff640240e14a062fef38f7faf0ccc212de5f7
Diffstat (limited to 'src/armnnOnnxParser/test/OnnxParserTestUtils.hpp')
-rw-r--r--src/armnnOnnxParser/test/OnnxParserTestUtils.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/armnnOnnxParser/test/OnnxParserTestUtils.hpp b/src/armnnOnnxParser/test/OnnxParserTestUtils.hpp
new file mode 100644
index 0000000000..4ed6543d28
--- /dev/null
+++ b/src/armnnOnnxParser/test/OnnxParserTestUtils.hpp
@@ -0,0 +1,21 @@
+//
+// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+namespace armnnUtils
+{
+
+std::string ConstructTensorShapeString(const std::vector<int>& shape)
+{
+ std::string shapeStr;
+ for (int i : shape)
+ {
+ shapeStr = fmt::format("{} dim {{ dim_value: {} }}", shapeStr, i);
+ }
+ return shapeStr;
+}
+
+} // namespace armnnUtils \ No newline at end of file