MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / gen_matrixmul_shape

Function gen_matrixmul_shape

dnn/src/cuda/matrix_mul/conv1x1.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 return conv_bias_opr_ptr;
36}
37std::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

Callers 3

is_availableMethod · 0.85
get_workspace_bundleMethod · 0.85
execMethod · 0.85

Calls 1

paramMethod · 0.45

Tested by

no test coverage detected