From f4019872c1134c6fcc1d6993e5746f55c1e79208 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 8 Mar 2022 20:01:38 +0000 Subject: IVGCVSW-6819 Fix the directory structure and broken link to latest docu Signed-off-by: Nikhil Raj Change-Id: I05b559d15faf92c76ff536719693b361316be4f3 --- 22.02/_pack_8cpp.xhtml | 150 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 22.02/_pack_8cpp.xhtml (limited to '22.02/_pack_8cpp.xhtml') diff --git a/22.02/_pack_8cpp.xhtml b/22.02/_pack_8cpp.xhtml new file mode 100644 index 0000000000..3817e7d578 --- /dev/null +++ b/22.02/_pack_8cpp.xhtml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + +ArmNN: src/armnnTfLiteParser/test/Pack.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Pack.cpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Functions

 TEST_SUITE ("TensorflowLiteParser_Pack")
 
+

Function Documentation

+ +

◆ TEST_SUITE()

+ +
+
+ + + + + + + + +
TEST_SUITE ("TensorflowLiteParser_Pack" )
+
+ +

Definition at line 9 of file Pack.cpp.

+ +

References ParserFlatbuffersFixture::Setup(), and TEST_CASE_FIXTURE().

+
10 {
11 struct PackFixture : public ParserFlatbuffersFixture
12 {
13  explicit PackFixture(const std::string & inputShape,
14  const unsigned int numInputs,
15  const std::string & outputShape,
16  const std::string & axis)
17  {
18  m_JsonString = R"(
19  {
20  "version": 3,
21  "operator_codes": [ { "builtin_code": "PACK" } ],
22  "subgraphs": [ {
23  "tensors": [)";
24 
25  for (unsigned int i = 0; i < numInputs; ++i)
26  {
27  m_JsonString += R"(
28  {
29  "shape": )" + inputShape + R"(,
30  "type": "FLOAT32",
31  "buffer": )" + std::to_string(i) + R"(,
32  "name": "inputTensor)" + std::to_string(i + 1) + R"(",
33  "quantization": {
34  "min": [ 0.0 ],
35  "max": [ 255.0 ],
36  "scale": [ 1.0 ],
37  "zero_point": [ 0 ],
38  }
39  },)";
40  }
41 
42  std::string inputIndexes;
43  for (unsigned int i = 0; i < numInputs-1; ++i)
44  {
45  inputIndexes += std::to_string(i) + R"(, )";
46  }
47  inputIndexes += std::to_string(numInputs-1);
48 
49  m_JsonString += R"(
50  {
51  "shape": )" + outputShape + R"( ,
52  "type": "FLOAT32",
53  "buffer": )" + std::to_string(numInputs) + R"(,
54  "name": "outputTensor",
55  "quantization": {
56  "min": [ 0.0 ],
57  "max": [ 255.0 ],
58  "scale": [ 1.0 ],
59  "zero_point": [ 0 ],
60  }
61  }
62  ],
63  "inputs": [ )" + inputIndexes + R"( ],
64  "outputs": [ 2 ],
65  "operators": [
66  {
67  "opcode_index": 0,
68  "inputs": [ )" + inputIndexes + R"( ],
69  "outputs": [ 2 ],
70  "builtin_options_type": "PackOptions",
71  "builtin_options": {
72  "axis": )" + axis + R"(,
73  "values_count": )" + std::to_string(numInputs) + R"(
74  },
75  "custom_options_format": "FLEXBUFFERS"
76  }
77  ],
78  } ],
79  "buffers" : [)";
80 
81  for (unsigned int i = 0; i < numInputs-1; ++i)
82  {
83  m_JsonString += R"(
84  { },)";
85  }
86  m_JsonString += R"(
87  { }
88  ]
89  })";
90  Setup();
91  }
92 };
93 
94 struct SimplePackFixture : PackFixture
95 {
96  SimplePackFixture() : PackFixture("[ 3, 2, 3 ]",
97  2,
98  "[ 3, 2, 3, 2 ]",
99  "3") {}
100 };
101 
102 TEST_CASE_FIXTURE(SimplePackFixture, "ParsePack")
103 {
104  RunTest<4, armnn::DataType::Float32>(
105  0,
106  { {"inputTensor1", { 1, 2, 3,
107  4, 5, 6,
108 
109  7, 8, 9,
110  10, 11, 12,
111 
112  13, 14, 15,
113  16, 17, 18 } },
114  {"inputTensor2", { 19, 20, 21,
115  22, 23, 24,
116 
117  25, 26, 27,
118  28, 29, 30,
119 
120  31, 32, 33,
121  34, 35, 36 } } },
122  { {"outputTensor", { 1, 19,
123  2, 20,
124  3, 21,
125 
126  4, 22,
127  5, 23,
128  6, 24,
129 
130 
131  7, 25,
132  8, 26,
133  9, 27,
134 
135  10, 28,
136  11, 29,
137  12, 30,
138 
139 
140  13, 31,
141  14, 32,
142  15, 33,
143 
144  16, 34,
145  17, 35,
146  18, 36 } } });
147 }
148 
149 }
+
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
+
void Setup(bool testDynamic=true)
+
+
+
+
+
+ + + + -- cgit v1.2.1