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

Function get_matmul_opr

dnn/src/fallback/convolution/algos.cpp:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29MatrixMul* get_matmul_opr(const NCBKernSizeParam& param) {
30 using ConvCM = param::Convolution::ComputeMode;
31 using MmCM = param::MatrixMul::ComputeMode;
32 static CpuOprDelegationStorage<3> storage;
33 if (param.filter_meta.format == param::Convolution::Format::NCHW44) {
34 MatrixMul::Param p;
35 p.format = param::MatrixMul::Format::MK4;
36 return storage.get<MatrixMul, 0>(p);
37 }
38 switch (param.compute_mode) {
39 default:
40 return storage.get<MatrixMul, 1>({});
41 case ConvCM::FLOAT32: {
42 MatrixMul::Param p;
43 p.compute_mode = MmCM::FLOAT32;
44 return storage.get<MatrixMul, 2>(p);
45 }
46 }
47}
48
49WorkspaceBundle get_bundle(const NCBKernSizeParam& param) {
50 UNPACK_CONV_F32_NCB_KERN_SIZES(param);

Callers 5

get_bundleFunction · 0.85
kern_matmulFunction · 0.85
kern_matmul_nchw44Function · 0.85
get_bundleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected