MCPcopy Create free account
hub / github.com/OAID/Tengine / main

Function main

internal/bin/test_concat_op.cpp:529–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529int main(int argc, char* argv[])
530{
531 int data_type = TENGINE_DT_FP32;
532 int layout = TENGINE_LAYOUT_NCHW;
533
534 int res;
535 while((res = getopt(argc, argv, "c:h:w:n:s:p:m:l:t:")) != -1)
536 {
537 switch(res)
538 {
539 case 't':
540 data_type = strtoul(optarg, NULL, 10);
541 break;
542 default:
543 break;
544 }
545 }
546
547 std::cout << "init_tengine\n";
548 init_tengine();
549
550 const char* pTitle[] = {"DatType", "Axis", "ConcatCounts", "Res"};
551 CVSResOut ResOut("concat_ref_test.cvs", pTitle, 4);
552
553 std::vector<int> vDims;
554 vDims.push_back(2);
555 vDims.push_back(3);
556 vDims.push_back(2);
557 vDims.push_back(2);
558
559 for(int axis = 0; axis < 4; ++axis)
560 {
561 data_type = 0;
562 test(layout, axis, data_type, vDims, ResOut);
563
564 // fp16
565 data_type++;
566 test(layout, axis, data_type, vDims, ResOut);
567
568 // int8
569 data_type++;
570 test(layout, axis, data_type, vDims, ResOut);
571
572 // uint8
573 data_type++;
574 test(layout, axis, data_type, vDims, ResOut);
575 }
576
577 ResOut.save();
578 release_tengine();
579
580 return 0;
581}

Callers

nothing calls this directly

Calls 4

init_tengineFunction · 0.85
release_tengineFunction · 0.85
testFunction · 0.70
saveMethod · 0.45

Tested by

no test coverage detected