| 483 | } |
| 484 | |
| 485 | std::pair<unsigned int, unsigned int> BatchMatMulDescriptor::GetAxesToMul( |
| 486 | DataLayout dataLayout, |
| 487 | const TensorShape& tensorShape) |
| 488 | { |
| 489 | auto numDims = tensorShape.GetNumDimensions(); |
| 490 | std::pair<unsigned int, unsigned int> axes = { numDims-2, numDims-1 }; |
| 491 | switch(dataLayout) |
| 492 | { |
| 493 | case DataLayout::NDHWC: |
| 494 | case DataLayout::NHWC: |
| 495 | axes.first -= 1; |
| 496 | axes.second -= 1; |
| 497 | break; |
| 498 | case DataLayout::NCDHW: |
| 499 | case DataLayout::NCHW: |
| 500 | default: |
| 501 | break; |
| 502 | } |
| 503 | return axes; |
| 504 | } |
| 505 | |
| 506 | std::vector<unsigned int> BatchMatMulDescriptor::GetAxesNotMul( |
| 507 | DataLayout dataLayout, |
nothing calls this directly
no test coverage detected