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

Method get_workspace

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

Source from the content-addressed store, hash-verified

175}
176
177size_t ConvolutionImpl::AlgoFallback::get_workspace(
178 const NCBKernSizeParam& param) const {
179 MIDOUT_BEGIN(megdnn_fallback_conv, midout_iv("AlgoFallback::get_workspace"_hash)) {
180 auto FH = param.filter_meta.spatial[0], FW = param.filter_meta.spatial[1];
181 size_t nr_threads = param.nr_threads;
182 if (param.filter_meta.should_flip) {
183 // need transpose filter
184 return WorkspaceBundle{nullptr, {FH * FW * sizeof(float)}}
185 .total_size_in_bytes() *
186 nr_threads;
187 } else {
188 return 0;
189 }
190 }
191 MIDOUT_END();
192 return 0;
193}
194
195SmallVector<ConvolutionImpl::NCBKern> ConvolutionImpl::AlgoFallback::dispatch_kern(
196 const NCBKernSizeParam& param) const {

Callers 3

ncb_1g_get_workspaceMethod · 0.45
get_bundleMethod · 0.45

Calls 3

total_size_in_bytesMethod · 0.80
MIDOUT_BEGINFunction · 0.70
get_bundleFunction · 0.70

Tested by

no test coverage detected