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

Method exec

dnn/src/fallback/convolution/opr_impl.cpp:95–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93#define NCB_ALGO_FUNC(name, algo, param) static_cast<AlgoBase*>(algo)->name(param)
94
95void ConvolutionImpl::exec(
96 _megdnn_tensor_in src, _megdnn_tensor_in filter, _megdnn_tensor_out dst,
97 const PreprocessedFilter* preprocessed_filter, _megdnn_workspace workspace) {
98 auto fparam = make_ncb_kern_param(src, filter, dst, preprocessed_filter, workspace);
99 auto&& algo = get_algorithm(fparam, workspace.size);
100 if (!is_naive_algo(algo) &&
101 NCB_ALGO_FUNC(get_workspace, algo, fparam) <= workspace.size) {
102 exec_with_ncb_kern(fparam, algo);
103 } else {
104 naive::ConvolutionForwardImpl::exec(
105 src, filter, dst, preprocessed_filter, workspace);
106 }
107}
108
109void ConvolutionImpl::exec_preprocess(
110 const TensorLayout& src_layout, _megdnn_tensor_in filter,

Callers 2

kern_matmulFunction · 0.45
kern_matmul_nchw44Function · 0.45

Calls 4

get_algorithmFunction · 0.85
execFunction · 0.50
paramFunction · 0.50
enumvMethod · 0.45

Tested by

no test coverage detected