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

Function MIDOUT_BEGIN

dnn/src/common/handle.cpp:55–82  ·  view source on GitHub ↗

only enable midout for CPU, becuase CPU might be unused when some other platforms are used

Source from the content-addressed store, hash-verified

53 // only enable midout for CPU, becuase CPU might be unused when some
54 // other platforms are used
55 MIDOUT_BEGIN(HandlePlatform, midout_iv(megcorePlatformCPU)) {
56 // CPU
57#if MEGDNN_NAIVE
58 return make_unique<naive::HandleImpl>(computing_handle);
59#else
60 if (debug_level == 0) {
61#if MEGDNN_X86
62 // Because of ICC bug, we cannot use make_unique here. It will
63 // trigger an internal compiler error.
64 return std::unique_ptr<x86::HandleImpl>(
65 new x86::HandleImpl(computing_handle));
66 // return make_unique<x86::HandleImpl>(computing_handle);
67#elif MEGDNN_ARMV7
68 return make_unique<armv7::HandleImpl>(computing_handle);
69#elif MEGDNN_AARCH64
70 return make_unique<aarch64::HandleImpl>(computing_handle);
71#else
72 return make_unique<fallback::HandleImpl>(computing_handle);
73#endif
74 } else if (debug_level == 1) {
75 return make_unique<fallback::HandleImpl>(computing_handle);
76 } else if (debug_level == 2) {
77 return make_unique<naive::HandleImpl>(computing_handle);
78 } else {
79 megdnn_throw("Debug level must be 0/1/2.");
80 }
81#endif
82 }
83 MIDOUT_END();
84
85 }

Callers 12

transposeFunction · 0.70
int8x8x32_kern_vnniFunction · 0.50
int8x8x32_kern_mkldnnFunction · 0.50
gemm_s8s8s32_avx2_2x4x16Function · 0.50
gemm_s8s8s32_avx2_4x16x2Function · 0.50
gemm_s8s8s32_sse_4x8x2Function · 0.50
gemm_f32_avx2_6x16Function · 0.50
get_kernMethod · 0.50
get_workspaceMethod · 0.50
usableMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected