| 488 | const char* CVSResOut::pDelimit = " "; |
| 489 | |
| 490 | void test(int layout, int axis, int data_type, const std::vector<int> dims, CVSResOut& rResFile) |
| 491 | { |
| 492 | const char* test_node_name = "test_concat_op"; |
| 493 | std::vector<ConcatInputParam> vInput; |
| 494 | std::vector<int> vDims = dims; |
| 495 | printf("test 1-1 Concat axis : %d. dataType : %d\n", axis, data_type); |
| 496 | __PUSH_PARAM__(dims[0], dims[1], dims[2], dims[3]); |
| 497 | vDims[axis] += 1; |
| 498 | __PUSH_PARAM__(dims[0], dims[1], dims[2], dims[3]); |
| 499 | if(0 == test_concat(test_node_name, vInput, axis, layout, data_type)) |
| 500 | { |
| 501 | printf("Axis[%d]-[%s]--------------------match-------------------\n", axis, gTypeName[data_type]); |
| 502 | rResFile.dump_res(gTypeName[data_type], axis, "1-1", "match"); |
| 503 | } |
| 504 | else |
| 505 | { |
| 506 | printf("Axis[%d]-[%s]--------------------not match-------------------\n", axis, gTypeName[data_type]); |
| 507 | rResFile.dump_res(gTypeName[data_type], axis, "1-1", "not match"); |
| 508 | } |
| 509 | |
| 510 | vDims = dims; |
| 511 | printf("test 1-1-1 Concat axis : %d. dataType : %d\n", axis, data_type); |
| 512 | __PUSH_PARAM__(dims[0], dims[1], dims[2], dims[3]); |
| 513 | vDims[axis] += 1; |
| 514 | __PUSH_PARAM__(dims[0], dims[1], dims[2], dims[3]); |
| 515 | vDims[axis] += 1; |
| 516 | __PUSH_PARAM__(dims[0], dims[1], dims[2], dims[3]); |
| 517 | if(0 == test_concat(test_node_name, vInput, axis, layout, data_type)) |
| 518 | { |
| 519 | printf("Axis[%d]-[%s]--------------------match-------------------\n", axis, gTypeName[data_type]); |
| 520 | rResFile.dump_res(gTypeName[data_type], axis, "1-1-1", "match"); |
| 521 | } |
| 522 | else |
| 523 | { |
| 524 | printf("Axis[%d]-[%s]--------------------match-------------------\n", axis, gTypeName[data_type]); |
| 525 | rResFile.dump_res(gTypeName[data_type], axis, "1-1-1", "not match"); |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | int main(int argc, char* argv[]) |
| 530 | { |
no test coverage detected