| 35 | return conv_bias_opr_ptr; |
| 36 | } |
| 37 | std::tuple<size_t, size_t, size_t> gen_matrixmul_shape( |
| 38 | const MatrixMulForwardImpl::AlgoBase::SizeArgs& args) { |
| 39 | size_t m, k, n; |
| 40 | if (!args.opr->param().transposeA) { |
| 41 | m = args.layout_a.shape[0]; |
| 42 | k = args.layout_a.shape[1]; |
| 43 | } else { |
| 44 | m = args.layout_a.shape[1]; |
| 45 | k = args.layout_a.shape[0]; |
| 46 | } |
| 47 | if (!args.opr->param().transposeB) { |
| 48 | megdnn_assert(k == args.layout_b.shape[0]); |
| 49 | n = args.layout_b.shape[1]; |
| 50 | } else { |
| 51 | megdnn_assert(k == args.layout_b.shape[1]); |
| 52 | n = args.layout_b.shape[0]; |
| 53 | } |
| 54 | return std::tuple<size_t, size_t, size_t>{m, k, n}; |
| 55 | } |
| 56 | |
| 57 | } // namespace |
| 58 |
no test coverage detected