15 ConcatFixture(
const std::string& axis,
16 const std::vector<int>& input0Shape,
17 const std::vector<int>& input1Shape,
18 const std::vector<int>& outputShape)
22 producer_name: "onnx-example" 74 struct ConcatAxis0Fixture : ConcatFixture
76 ConcatAxis0Fixture() : ConcatFixture(
"0", { 1, 3, 2, 5 }, { 1, 3, 2, 5 }, { 2, 3, 2, 5 }) {}
79 struct ConcatAxis1Fixture : ConcatFixture
81 ConcatAxis1Fixture() : ConcatFixture(
"1", { 2, 2, 1, 3 }, { 2, 1, 1, 3 }, { 2, 3, 1, 3 }) {}
84 struct ConcatAxis2Fixture : ConcatFixture
86 ConcatAxis2Fixture() : ConcatFixture(
"2", { 2, 3, 1, 1 }, { 2, 3, 2, 1 }, { 2, 3, 3, 1 }) {}
89 struct ConcatAxis3Fixture : ConcatFixture
91 ConcatAxis3Fixture() : ConcatFixture(
"3", { 1, 3, 2, 2 }, { 1, 3, 2, 2 }, { 1, 3, 2, 4 }) {}
94 struct ConcatNegativeAxisFixture : ConcatFixture
96 ConcatNegativeAxisFixture() : ConcatFixture(
"-1", { 1, 2, 5 }, { 1, 2, 3 }, { 1, 2, 8 }) {}
101 RunTest<4, float>({{
"Input0", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
102 6.0f, 7.0f, 8.0f, 9.0f, 10.0f,
103 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
104 16.0f, 17.0f, 18.0f, 19.0f, 20.0f,
105 21.0f, 22.0f, 23.0f, 24.0f, 25.0f,
106 26.0f, 27.0f, 28.0f, 29.0f, 30.0f }},
107 {
"Input1", { 31.0f, 32.0f, 33.0f, 34.0f, 35.0f,
108 36.0f, 37.0f, 38.0f, 39.0f, 40.0f,
109 41.0f, 42.0f, 43.0f, 44.0f, 45.0f,
110 46.0f, 47.0f, 48.0f, 49.0f, 50.0f,
111 51.0f, 52.0f, 53.0f, 54.0f, 55.0f,
112 56.0f, 57.0f, 58.0f, 59.0f, 60.0f }}},
113 {{
"Output", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
114 6.0f, 7.0f, 8.0f, 9.0f, 10.0f,
115 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
116 16.0f, 17.0f, 18.0f, 19.0f, 20.0f,
117 21.0f, 22.0f, 23.0f, 24.0f, 25.0f,
118 26.0f, 27.0f, 28.0f, 29.0f, 30.0f,
119 31.0f, 32.0f, 33.0f, 34.0f, 35.0f,
120 36.0f, 37.0f, 38.0f, 39.0f, 40.0f,
121 41.0f, 42.0f, 43.0f, 44.0f, 45.0f,
122 46.0f, 47.0f, 48.0f, 49.0f, 50.0f,
123 51.0f, 52.0f, 53.0f, 54.0f, 55.0f,
124 56.0f, 57.0f, 58.0f, 59.0f, 60.0f }}});
129 RunTest<4, float>({{
"Input0", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f }},
130 {
"Input1", { 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f }}},
131 {{
"Output", { 1.0f, 2.0f, 3.0f,
136 16.0f, 17.0f, 18.0f }}});
141 RunTest<4, float>({{
"Input0", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }},
142 {
"Input1", { 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f }}},
143 {{
"Output", { 1.0f, 7.0f, 8.0f,
148 6.0f, 17.0f, 18.0f }}});
153 RunTest<4, float>({{
"Input0", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f,
154 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f }},
155 {
"Input1", { 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f,
156 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f }}},
157 {{
"Output", { 1.0f, 2.0f, 13.0f, 14.0f,
158 3.0f, 4.0f, 15.0f, 16.0f,
159 5.0f, 6.0f, 17.0f, 18.0f,
160 7.0f, 8.0f, 19.0f, 20.0f,
161 9.0f, 10.0f, 21.0f, 22.0f,
162 11.0f, 12.0f, 23.0f, 24.0f }}});
167 RunTest<3, float>({{
"Input0", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,
168 6.0f, 7.0f, 8.0f, 9.0f, 10.0f }},
169 {
"Input1", { 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f }}},
170 {{
"Output", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 11.0f, 12.0f, 13.0f,
171 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 14.0f, 15.0f, 16.0f }}});
176 ConcatMultipleInputsFixture()
180 producer_name: "onnx-example" 266 RunTest<2, float>({{
"Input0", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }},
267 {
"Input1", { 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f }},
268 {
"Input2", { 16.0f, 17.0f, 18.0f }}},
269 {{
"Output", { 1.0f, 2.0f, 7.0f, 8.0f, 9.0f, 16.0f,
270 3.0f, 4.0f, 10.0f, 11.0f, 12.0f, 17.0f,
271 5.0f, 6.0f, 13.0f, 14.0f, 15.0f, 18.0f }}});
std::string ConstructTensorShapeString(const std::vector< int > &shape)
TEST_SUITE("OnnxParser_Concat")
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")