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

Method exec

dnn/src/fallback/matrix_mul/opr_impl.cpp:251–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void MatrixMulImpl::exec(
252 _megdnn_tensor_in A, _megdnn_tensor_in B, _megdnn_tensor_out C,
253 _megdnn_workspace workspace) {
254 check_exec(A.layout, B.layout, C.layout, workspace.size);
255
256 if (auto algo = get_algorithm_heuristic(
257 A.layout, B.layout, C.layout, std::numeric_limits<size_t>::max(),
258 AlgoAttribute::DEFAULT, AlgoAttribute::DEFAULT)) {
259 auto kern_param = make_kern_param(A, B, C, workspace);
260 auto kern = static_cast<AlgoBase*>(algo)->get_kern(kern_param);
261 auto run = [kern, kern_param]() { kern(kern_param); };
262 static_cast<naive::HandleImpl*>(handle())->dispatch_kern(run);
263 return;
264 }
265
266 naive::MatrixMulForwardImpl::exec(A, B, C, workspace);
267}
268
269MatrixMulImpl::AlgoDataType MatrixMulImpl::KernSizeParam::deduce_algo_data_type()
270 const {

Callers

nothing calls this directly

Calls 5

maxFunction · 0.85
make_kern_paramFunction · 0.50
execFunction · 0.50
get_kernMethod · 0.45
dispatch_kernMethod · 0.45

Tested by

no test coverage detected