13 explicit DepthwiseConvolution2dFixture(
const std::string& inputShape,
14 const std::string& outputShape,
15 const std::string& filterShape,
16 const std::string& filterData,
17 const std::string& strides,
18 const std::string& paddingType,
19 const std::string biasShape =
"",
20 const std::string biasData =
"")
22 std::string inputTensors =
"[ 0, 2 ]";
23 std::string biasTensor =
"";
24 std::string biasBuffer =
"";
25 if (biasShape.size() > 0 && biasData.size() > 0)
27 inputTensors =
"[ 0, 2, 3 ]";
30 "shape": )" + biasShape + R"( , 42 { "data": )" + biasData + R"(, }, )"; 47 "operator_codes": [ { "builtin_code": "DEPTHWISE_CONV_2D" } ], 51 "shape": )" + inputShape + R"(, 54 "name": "inputTensor", 63 "shape": )" + outputShape + R"(, 66 "name": "outputTensor", 75 "shape": )" + filterShape + R"(, 78 "name": "filterTensor", 85 }, )" + biasTensor + R"( 92 "inputs": )" + inputTensors + R"(, 94 "builtin_options_type": "DepthwiseConv2DOptions", 96 "padding": ")" + paddingType + R"(", 97 "stride_w": )" + strides+ R"(, 98 "stride_h": )" + strides+ R"(, 99 "depth_multiplier": 1, 100 "fused_activation_function": "NONE" 102 "custom_options_format": "FLEXBUFFERS" 109 { "data": )" + filterData + R"(, }, )" 118 struct DepthwiseConvolution2dSameFixture : DepthwiseConvolution2dFixture
120 DepthwiseConvolution2dSameFixture()
121 : DepthwiseConvolution2dFixture(
"[ 1, 3, 3, 1 ]",
124 "[ 9,8,7, 6,5,4, 3,2,1 ]",
132 RunTest<4, armnn::DataType::QAsymmU8>(
142 110/2, 197/2, 158/2 });
145 struct DepthwiseConvolution2dValidFixture : DepthwiseConvolution2dFixture
147 DepthwiseConvolution2dValidFixture ()
148 : DepthwiseConvolution2dFixture(
"[ 1, 3, 3, 1 ]",
151 "[ 9,8,7, 6,5,4, 3,2,1 ]",
157 TEST_CASE_FIXTURE(DepthwiseConvolution2dValidFixture,
"ParseDepthwiseConv2DValid")
159 RunTest<4, armnn::DataType::QAsymmU8>(
168 struct DepthwiseConvolution2dSameBiasFixture : DepthwiseConvolution2dFixture
170 DepthwiseConvolution2dSameBiasFixture()
171 : DepthwiseConvolution2dFixture(
"[ 1, 3, 3, 1 ]",
174 "[ 9,8,7, 6,5,4, 3,2,1 ]",
182 TEST_CASE_FIXTURE(DepthwiseConvolution2dSameBiasFixture,
"ParseDepthwiseConv2DSameBias")
184 RunTest<4, armnn::DataType::QAsymmU8>(
190 { ( 14+10)/2, ( 35+10)/2, ( 38+10)/2,
191 ( 57+10)/2, (120+10)/2, (111+10)/2,
192 (110+10)/2, (197+10)/2, (158+10)/2 });
195 struct DynamicDepthwiseConvolution2dSameBiasFixture : DepthwiseConvolution2dFixture
197 DynamicDepthwiseConvolution2dSameBiasFixture()
198 : DepthwiseConvolution2dFixture(
"[ 1, 3, 3, 1 ]",
201 "[ 9,8,7, 6,5,4, 3,2,1 ]",
209 TEST_CASE_FIXTURE(DynamicDepthwiseConvolution2dSameBiasFixture,
"ParseDynamicDepthwiseConv2DSameBias")
211 RunTest<4, armnn::DataType::QAsymmU8, armnn::DataType::QAsymmU8>(0,
212 { {
"inputTensor", { 0, 1, 2,
215 { {
"outputTensor", { ( 14+10)/2, ( 35+10)/2, ( 38+10)/2,
216 ( 57+10)/2, (120+10)/2, (111+10)/2,
217 (110+10)/2, (197+10)/2, (158+10)/2 } } },
223 explicit DepthwiseConvolution2dFixture2(
const std::string& inputShape,
224 const std::string& outputShape,
225 const std::string& filterShape,
226 const std::string& filterData,
227 const std::string& strides,
228 const std::string& paddingType,
229 const std::string biasShape =
"",
230 const std::string biasData =
"",
231 const std::string filter_quant_min =
"[ 0.0 ]",
232 const std::string filter_quant_max =
"[ 255.0 ]",
233 const std::string filter_quant_scale =
"[ 1.0 ]",
234 const std::string filter_quant_zero_point =
"[ 0 ]",
235 const std::string filter_quant_axis =
"",
236 const std::string output_scale =
"[ 1.0 ]")
238 std::string inputTensors =
"[ 0, 2 ]";
239 std::string biasTensor =
"";
240 std::string biasBuffer =
"";
241 if (biasShape.size() > 0 && biasData.size() > 0)
243 inputTensors =
"[ 0, 2, 3 ]";
246 "shape": )" + biasShape + R"( , 249 "name": "biasTensor", 258 { "data": )" + biasData + R"(, }, )"; 261 std::string filter_qantization = 263 "min": )" + filter_quant_min + R"(, 264 "max": )" + filter_quant_max + R"(, 265 "scale": )" + filter_quant_scale + R"(, 266 "zero_point": )" + filter_quant_zero_point; 268 if (filter_quant_axis.size() > 0)
270 filter_qantization +=
272 "quantized_dimension": )" + filter_quant_axis; 277 "operator_codes": [ { "builtin_code": "DEPTHWISE_CONV_2D" } ], 281 "shape": )" + inputShape + R"(, 284 "name": "inputTensor", 293 "shape": )" + outputShape + R"(, 296 "name": "outputTensor", 300 "scale": )" + output_scale + R"(, 305 "shape": )" + filterShape + R"(, 308 "name": "filterTensor", 309 "quantization": {)" + filter_qantization + R"( 311 }, )" + biasTensor + R"( 318 "inputs": )" + inputTensors + R"(, 320 "builtin_options_type": "DepthwiseConv2DOptions", 322 "padding": ")" + paddingType + R"(", 323 "stride_w": )" + strides+ R"(, 324 "stride_h": )" + strides+ R"(, 325 "depth_multiplier": 1, 326 "fused_activation_function": "NONE" 328 "custom_options_format": "FLEXBUFFERS" 335 { "data": )" + filterData + R"(, }, )" 340 SetupSingleInputSingleOutput("inputTensor",
"outputTensor");
346 struct DepthwiseConvolution2dNoQuantFixture : DepthwiseConvolution2dFixture2
348 DepthwiseConvolution2dNoQuantFixture()
349 : DepthwiseConvolution2dFixture2(
"[ 1, 3, 3, 3 ]",
352 "[ 9,8,7, 6,5,4, 3,2,1, " 353 "9,8,7, 6,5,4, 3,2,1, " 354 "9,8,7, 6,5,4, 3,2,1 ]",
364 TEST_CASE_FIXTURE(DepthwiseConvolution2dNoQuantFixture,
"ParseDepthwiseConv2DNoQuant")
366 RunTest<4, armnn::DataType::QAsymmS8>(
368 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
369 { 18, 14, 10, 36, 30, 24, 30, 26, 22, 27, 21, 15, 54, 45,
370 36, 45, 39, 33, 18, 14, 10, 36, 30, 24, 30, 26, 22});
374 struct DepthwiseConvolution2dNoChannelQuantFixture : DepthwiseConvolution2dFixture2
376 DepthwiseConvolution2dNoChannelQuantFixture()
377 : DepthwiseConvolution2dFixture2(
"[ 1, 3, 3, 3 ]",
380 "[ 9,8,7, 6,5,4, 3,2,1, 9,8,7, 6,5,4, 3,2,1, 9,8,7, 6,5,4, 3,2,1 ]",
396 TEST_CASE_FIXTURE(DepthwiseConvolution2dNoChannelQuantFixture,
"ParseDepthwiseConv2DFilterNoChannelQuant")
398 RunTest<4, armnn::DataType::QAsymmS8>(
400 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
401 { 18, 14, 10, 36, 30, 24, 30, 26, 22, 27, 21, 15, 54, 45,
402 36, 45, 39, 33, 18, 14, 10, 36, 30, 24, 30, 26, 22});
406 struct DepthwiseConvolution2dWeightsPerChannelQuantFixture : DepthwiseConvolution2dFixture2
408 DepthwiseConvolution2dWeightsPerChannelQuantFixture()
409 : DepthwiseConvolution2dFixture2(
"[ 1, 3, 3, 3 ]",
414 "[36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, " 415 "20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12, 8, 4]",
422 "[ 0.25, 0.25, 0.25]",
432 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant")
434 RunTest<4, armnn::DataType::QAsymmS8>(
436 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
437 { 18, 14, 10, 36, 30, 24, 30, 26, 22, 27, 21, 15, 54, 45,
438 36, 45, 39, 33, 18, 14, 10, 36, 30, 24, 30, 26, 22});
442 struct DepthwiseConvolution2dWeightsPerChannelQuant1Fixture : DepthwiseConvolution2dFixture2
444 DepthwiseConvolution2dWeightsPerChannelQuant1Fixture()
445 : DepthwiseConvolution2dFixture2(
"[ 1, 3, 3, 3 ]",
450 "[36, 40, 70, 24, 25, 40, 12, 10, 10, 36, 40, 70, 24, " 451 "25, 40, 12, 10, 10, 36, 40, 70, 24, 25, 40, 12, 10, 10]",
468 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant1")
470 RunTest<4, armnn::DataType::QAsymmS8>(
472 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
473 { 18, 14, 10, 36, 30, 24, 30, 26, 22, 27, 21, 15, 54, 45,
474 36, 45, 39, 33, 18, 14, 10, 36, 30, 24, 30, 26, 22});
480 struct DepthwiseConvolution2dWeightsPerChannelQuant2Fixture : DepthwiseConvolution2dFixture2
482 DepthwiseConvolution2dWeightsPerChannelQuant2Fixture()
483 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
488 "[36, 40, 70, 20, 20, 20, 30, 6, 4, 45, 80, 23, 24, 25, 40, 10]",
495 "[ 0.25, 0.2, 0.1, 0.3]",
506 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant2")
508 RunTest<4, armnn::DataType::QAsymmS8>(
510 { 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
511 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
512 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
513 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1},
514 { 21, 26, 22, 18, 21, 26, 22, 18, 21, 26, 22, 18, 10, 17, 15, 13,
515 21, 26, 22, 18, 21, 26, 22, 18, 21, 26, 22, 18, 10, 17, 15, 13,
516 21, 26, 22, 18, 21, 26, 22, 18, 21, 26, 22, 18, 10, 17, 15, 13,
517 14, 12, 10, 8, 14, 12, 10, 8, 14, 12, 10, 8, 9, 8, 7, 6});
521 struct DepthwiseConvolution2dWeightsPerChannelQuant4Fixture : DepthwiseConvolution2dFixture2
523 DepthwiseConvolution2dWeightsPerChannelQuant4Fixture()
524 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
532 "[36, 40, 70, 20, 20, 20, 30, 6, 4, 45, 80, 23, 24, 25, 40, 10, " 533 "36, 40, 70, 20, 20, 20, 30, 6, 4, 45, 80, 23, 24, 25, 40, 10, " 534 "36, 40, 70, 20, 20, 20, 30, 6, 4, 45, 80, 23, 24, 25, 40, 10, " 535 "36, 40, 70, 20, 20, 20, 30, 6, 4, 45, 80, 23, 24, 25, 40, 10]",
542 "[ 0.25, 0.2, 0.1, 0.3," 543 "0.25, 0.2, 0.1, 0.3," 544 "0.25, 0.2, 0.1, 0.3," 545 "0.25, 0.2, 0.1, 0.3]",
555 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant4")
557 RunTest<4, armnn::DataType::QAsymmS8>(
559 { 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
560 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
561 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
562 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1},
563 { 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
564 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
565 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
566 18, 16, 14, 12, 10, 8, 6, 4, 2, 18, 16, 14, 12, 10, 8, 6,
567 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
568 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
569 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
570 18, 16, 14, 12, 10, 8, 6, 4, 2, 18, 16, 14, 12, 10, 8, 6,
571 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
572 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
573 36, 32, 28, 24, 20, 16, 12, 8, 4, 36, 32, 28, 24, 20, 16, 12,
574 18, 16, 14, 12, 10, 8, 6, 4, 2, 18, 16, 14, 12, 10, 8, 6,
575 18, 16, 14, 12, 10, 8, 6, 4, 2, 18, 16, 14, 12, 10, 8, 6,
576 18, 16, 14, 12, 10, 8, 6, 4, 2, 18, 16, 14, 12, 10, 8, 6,
577 18, 16, 14, 12, 10, 8, 6, 4, 2, 18, 16, 14, 12, 10, 8, 6,
578 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3});
582 struct DepthwiseConvolution2dWeightsPerChannelQuant6Fixture : DepthwiseConvolution2dFixture2
584 DepthwiseConvolution2dWeightsPerChannelQuant6Fixture()
585 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
593 "[12,20,10, 3, 4,15,30, 6, 4,20,30,12, 4,10,20,12," 594 " 8, 0,30, 3, 0,10,40, 9,16,15, 0, 3,12,20,40, 3," 595 " 12,15,20, 0, 0, 0,10, 9,12,10,40,12,12, 5,10, 9," 596 " 4, 0, 0, 6,12, 0,10, 3,16,10,20, 3, 8,15,20, 0]",
603 "[ 0.25, 0.2, 0.1, 0.333333333," 604 "0.25, 0.2, 0.1, 0.333333333," 605 "0.25, 0.2, 0.1, 0.333333333," 606 "0.25, 0.2, 0.1, 0.333333333]",
616 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant6")
618 RunTest<4, armnn::DataType::QAsymmS8>(
620 { 1,0,1,2,0,4,4,0,2,1,2,0,1,3,3,0,
621 1,2,2,3,3,4,1,1,2,4,1,3,4,2,0,2,
622 0,3,1,3,4,3,2,0,1,2,3,3,0,2,4,2,
623 1,2,1,4,3,4,1,3,1,0,2,3,1,3,2,0},
624 { 9, 7, 3, 7,12, 8,22,22,27,22,13,17,13,10, 9,17,
625 15, 9,12, 6,16,14,24,27,19,26,18,23, 9,10, 7, 3,
626 18,14, 9,11, 7, 9,21,25,17,19,10,15,13, 9, 7, 9,
627 15,16, 9, 1, 3, 9,11,12, 3,12, 9,12, 6, 2, 2, 6,
628 13, 4,10,12,11,14,28,28,17,17,14,15,15,13,13,22,
629 26,24,17, 7,10,20,33,31,23,17,17,16,16,23,20, 7,
630 17,11,16, 6,10,16,24,22,26,18,23,20,22,23,21,23,
631 12,16, 4, 4, 2, 6, 8,10,12, 8,16,16, 8, 6, 6,14,
632 14, 3,14,10,15,15,27,25,16,14, 9,11,21,19,16,24,
633 24,25,13, 7, 3,13,21,24,25,23,14,17,24,24,21,12,
634 7, 7, 3, 3,11,10,17,13,33,32,21,26,18,17,17,23,
635 3, 3, 2, 0, 2, 6, 9,13,10,20,20,24, 2, 4, 4, 8,
636 9, 4,10, 4, 2,14,22,16, 5, 7, 3, 5,13,20,20,19,
637 11,12, 6, 4, 4,12,12, 8, 9,10, 3, 6,12,18,18,15,
638 5, 4, 4, 2, 0, 6,12, 9,10,14, 6,10, 3, 6, 6,12,
639 3, 4, 1, 1, 3, 9, 9, 6, 2, 8, 6, 8, 0, 0, 0, 0});
643 struct DepthwiseConvolution2dWeightsPerChannelQuant1_1Fixture : DepthwiseConvolution2dFixture2
645 DepthwiseConvolution2dWeightsPerChannelQuant1_1Fixture()
646 : DepthwiseConvolution2dFixture2(
"[ 1, 3, 3, 3 ]",
653 "[ 4,20, 0, 8,20,30, 4, 0,10,12," 654 " 0,40, 0, 5,30,16,10,40,12, 0," 655 "30,16,20, 0,12,20,20]",
672 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant1_1")
674 RunTest<4, armnn::DataType::QAsymmS8>(
676 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
677 { 11,11, 9,17,11,16,10, 5,10,
678 14,15,13,21,19,20,13,13,13,
679 7, 7,11,11,11,15, 6, 9,10});
683 struct DepthwiseConvolution2dWeightsPerChannelQuant1_2Fixture : DepthwiseConvolution2dFixture2
685 DepthwiseConvolution2dWeightsPerChannelQuant1_2Fixture()
686 : DepthwiseConvolution2dFixture2(
"[ 1, 3, 3, 3 ]",
693 "[ 4,20, 0, 8,20,30, 4, 0,10,12," 694 " 0,40, 0, 5,30,16,10,40,12, 0," 695 "30,16,20, 0,12,20,20]",
712 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant1_2")
714 RunTest<4, armnn::DataType::QAsymmS8>(
719 { 0,30,16,15,30,32, 8, 9,24,
720 20,33,28,34,48,50,18,38,35,
721 8, 8,36,20,28,33,10,28,25});
725 struct DepthwiseConvolution2dWeightsPerChannelQuant4_1Fixture : DepthwiseConvolution2dFixture2
727 DepthwiseConvolution2dWeightsPerChannelQuant4_1Fixture()
728 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
736 "[12,20,10, 3, 4,15,30, 6, 4,20,30,13, 4,10,20,13," 737 " 8, 0,30, 3, 0,10,40,10,16,15, 0, 3,12,20,40, 3," 738 " 12,15,20, 0, 0, 0,10,10,12,10,40,13,12, 5,10,10," 739 " 4, 0, 0, 6,12, 0,10, 3,16,10,20, 3, 8,15,20, 0]",
746 "[ 0.25, 0.2, 0.1, 0.3," 747 "0.25, 0.2, 0.1, 0.3," 748 "0.25, 0.2, 0.1, 0.3," 749 "0.25, 0.2, 0.1, 0.3]",
759 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant4_1")
761 RunTest<4, armnn::DataType::QAsymmS8>(
763 { 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
764 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
765 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,
766 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1},
767 { 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
768 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
769 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
770 6, 7, 3, 1, 1, 3, 4, 5, 4, 6, 7, 8, 4, 3, 3, 7,
771 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
772 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
773 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
774 6, 7, 3, 1, 1, 3, 4, 5, 4, 6, 7, 8, 4, 3, 3, 7,
775 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
776 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
777 9, 7, 6, 4, 4, 5, 9, 9,12,11, 9,10, 9,10, 9, 8,
778 6, 7, 3, 1, 1, 3, 4, 5, 4, 6, 7, 8, 4, 3, 3, 7,
779 5, 4, 4, 2, 1, 5, 7, 5, 5, 7, 3, 5, 4, 6, 6, 5,
780 5, 4, 4, 2, 1, 5, 7, 5, 5, 7, 3, 5, 4, 6, 6, 5,
781 5, 4, 4, 2, 1, 5, 7, 5, 5, 7, 3, 5, 4, 6, 6, 5,
782 3, 4, 1, 1, 1, 3, 3, 2, 1, 4, 3, 4, 1, 2, 2, 4});
787 struct DepthwiseConvolution2dWeightsPerChannelQuant4_2Fixture : DepthwiseConvolution2dFixture2
789 DepthwiseConvolution2dWeightsPerChannelQuant4_2Fixture()
790 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
798 "[12,20,10, 3, 4,15,30, 6, 4,20,30,13, 4,10,20,13," 799 " 8, 0,30, 3, 0,10,40,10,16,15, 0, 3,12,20,40, 3," 800 " 12,15,20, 0, 0, 0,10,10,12,10,40,13,12, 5,10,10," 801 " 4, 0, 0, 6,12, 0,10, 3,16,10,20, 3, 8,15,20, 0]",
808 "[ 0.25, 0.2, 0.1, 0.3," 809 "0.25, 0.2, 0.1, 0.3," 810 "0.25, 0.2, 0.1, 0.3," 811 "0.25, 0.2, 0.1, 0.3]",
821 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant4_2")
823 RunTest<4, armnn::DataType::QAsymmS8>(
825 { 3,3,3,4, 4,4,0,0, 0,3,4,3, 0,2,2,3,
826 3,0,3,0, 0,3,2,1, 4,1,2,2, 0,0,0,4,
827 3,2,2,2, 2,1,0,4, 4,3,2,4, 3,2,0,0,
828 4,1,4,4, 1,0,4,3, 3,2,0,3, 1,1,0,2},
829 { 26,21,21, 7,12,17,28,21,20,22,25,26, 6,11,10,16,
830 16,16, 4,12, 7,18,28,27,30,20,12,14,16,19,17, 6,
831 12,12, 8, 0, 3,13,18,15,18,26,20,26,26,32,28,21,
832 0, 0, 0, 0, 2, 6, 6, 4, 2, 8, 6, 8,15,10,10,24,
833 20,21, 9, 7, 3, 6,15,16,17,22,17,22,17,18,14, 7,
834 18, 6,16,12,12,11,17,15,18,18,10,12,27,26,22,18,
835 27,28,12,10, 7, 3, 8,13, 8,12,14,16,26,24,24,24,
836 9, 9, 6, 0, 0, 0, 2, 6, 0, 0, 0, 0, 4, 8, 8,16,
837 26,24,17, 7, 2, 8,11,10,30,24,30,28,32,33,30,24,
838 20,11,16,12, 7, 9,17,13,20,14,16,18,31,36,33,29,
839 28,25,19, 9, 6,13,20,19, 2, 8, 6, 8,17,17,15,25,
840 12,15, 5, 3, 2, 6, 7, 7, 0, 0, 0, 0, 6, 2, 2, 6,
841 14,16, 7, 5, 1, 3, 3, 2,20,28,12,20,13,20,20,19,
842 9, 4,10, 4, 0, 4, 8, 6, 4,16,12,16,12,18,18,15,
843 11,12, 6, 4, 2, 8,10, 7, 0, 0, 0, 0, 9,14,14,14,
844 3, 4, 1, 1, 1, 3, 3, 2, 0, 0, 0, 0, 2, 4, 4, 8});
848 struct DepthwiseConvolution2dWeightsPerChannelQuant4_5Fixture : DepthwiseConvolution2dFixture2
850 DepthwiseConvolution2dWeightsPerChannelQuant4_5Fixture()
851 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
866 "[ 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16," 867 " 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32," 868 " 33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48," 869 "49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64]",
876 "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16]",
887 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant4_5")
889 RunTest<4, armnn::DataType::QAsymmS8>(
891 { 1,1,1,2,2,2,1,2,1,2,2,1,2,2,1,1,1,1,1,1,1,2,2,2,
892 1,2,2,2,1,1,1,2,1,1,1,1,2,1,2,1,2,1,1,2,1,2,1,1,
893 1,2,2,1,2,2,1,1,2,1,2,1,1,2,1,2},
894 { 1, 2, 3, 5, 9,11,14,16,17,19,21,24,32,36,39,43,
895 1, 2, 3, 4,11,14,17,20,22,26,29,33,34,38,42,46,
896 1, 2, 3, 5, 8,11,13,16,16,18,21,24,33,36,39,43,
897 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6,13,14,16,17,
898 1, 3, 4, 6, 6, 8,10,12,19,22,24,27,23,25,28,30,
899 1, 3, 5, 8, 7, 8,10,12,18,21,24,27,32,36,39,43,
900 1, 2, 4, 5, 8,10,13,15,12,14,16,18,30,33,37,40,
901 0, 0, 1, 1, 3, 4, 5, 7, 4, 5, 5, 6, 9,10,11,12,
902 1, 3, 5, 7,10,12,15,17,17,20,23,25,19,21,23,25,
903 2, 4, 6, 8, 7, 9,11,13,17,20,23,25,23,25,28,30,
904 1, 2, 4, 6, 9,11,14,16,15,17,20,22,28,31,35,38,
905 0, 0, 1, 1, 4, 5, 6, 7, 4, 5, 5, 6,13,14,16,17,
906 0, 0, 1, 1, 2, 3, 4, 5, 3, 4, 5, 6, 5, 6, 6, 7,
907 0, 0, 1, 1, 1, 2, 2, 3, 5, 6, 7, 8, 5, 6, 6, 7,
908 0, 0, 0, 1, 2, 3, 3, 4, 3, 4, 5, 6, 9,10,11,12,
909 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 3, 3, 4, 5});
913 struct DepthwiseConvolution2dWeightsPerChannelQuant4_3_1Fixture : DepthwiseConvolution2dFixture2
915 DepthwiseConvolution2dWeightsPerChannelQuant4_3_1Fixture()
916 : DepthwiseConvolution2dFixture2(
"[ 1, 4, 4, 4 ]",
924 "[12,20,10, 3, 2,24, 9,10, 5,16,30,12, 3,10, 4,32," 925 " 8, 0,30, 3, 0,16,12,15,20,12, 0, 3, 9,20, 8, 8," 926 " 12,15,20, 0, 0, 0, 3,15,15, 8,40,12, 9, 5, 2,24," 927 " 4, 0, 0, 6, 6, 0, 3, 5,20, 8,20, 3, 6,15, 4, 0]",
934 "[0.25, 0.2, 0.1, 0.3333333333, " 935 "0.5, 0.125, 0.33333333, 0.2, " 936 "0.2, 0.25, 0.1, 0.333333333, " 937 "0.3333333333, 0.2, 0.5, 0.125]",
947 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant4_3_1")
949 RunTest<4, armnn::DataType::QAsymmS8>(
951 { 3,3,3,4, 4,4,0,0, 0,3,4,3, 0,2,2,3,
952 3,0,3,0, 0,3,2,1, 4,1,2,2, 0,0,0,4,
953 3,2,2,2, 2,1,0,4, 4,3,2,4, 3,2,0,0,
954 4,1,4,4, 1,0,4,3, 3,2,0,3, 1,1,0,2},
955 { 26,21,21, 7,12,17,28,21,20,22,25,26, 6,11,10,16,
956 16,16, 4,12, 7,18,28,27,30,20,12,14,16,19,17, 6,
957 12,12, 8, 0, 3,13,18,15,18,26,20,26,26,32,28,21,
958 0, 0, 0, 0, 2, 6, 6, 4, 2, 8, 6, 8,15,10,10,24,
959 20,21, 9, 7, 3, 6,15,16,17,22,17,22,17,18,14, 7,
960 18, 6,16,12,12,11,17,15,18,18,10,12,27,26,22,18,
961 27,28,12,10, 7, 3, 8,13, 8,12,14,16,26,24,24,24,
962 9, 9, 6, 0, 0, 0, 2, 6, 0, 0, 0, 0, 4, 8, 8,16,
963 26,24,17, 7, 2, 8,11,10,30,24,30,28,32,33,30,24,
964 20,11,16,12, 7, 9,17,13,20,14,16,18,31,36,33,29,
965 28,25,19, 9, 6,13,20,19, 2, 8, 6, 8,17,17,15,25,
966 12,15, 5, 3, 2, 6, 7, 7, 0, 0, 0, 0, 6, 2, 2, 6,
967 14,16, 7, 5, 1, 3, 3, 2,20,28,12,20,13,20,20,19,
968 9, 4,10, 4, 0, 4, 8, 6, 4,16,12,16,12,18,18,15,
969 11,12, 6, 4, 2, 8,10, 7, 0, 0, 0, 0, 9,14,14,14,
970 3, 4, 1, 1, 1, 3, 3, 2, 0, 0, 0, 0, 2, 4, 4, 8});
973 struct DepthwiseConvolution2dWeightsPerChannelQuant4_3_2Fixture : DepthwiseConvolution2dFixture2
975 DepthwiseConvolution2dWeightsPerChannelQuant4_3_2Fixture()
976 : DepthwiseConvolution2dFixture2(
"[ 1, 2, 2, 2 ]",
984 "[0, 5,20, 9,16,25,60,21,32," 985 " 0,10, 6,12,20,50,18,28,40," 986 " 0, 3, 8,15,40,15,24,35,80," 987 " 0, 4,10,30,12,20,30,70,24]",
994 "[0.25, 0.2, 0.1, 0.3333333333]",
1004 "ParseDepthwiseConv2DFilterWeightsPerChannelQuant4_3_2")
1006 RunTest<4, armnn::DataType::QAsymmS8>(
1009 { 38,50,76,92,44,56,66,37,56,50,37,53,62,74,45,61});
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)