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

Method do_exec

dnn/src/naive/relayout/opr_impl.cpp:43–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void RelayoutForwardImpl::do_exec(_megdnn_tensor_in src, _megdnn_tensor_out dst) {
44 MIDOUT_BEGIN(naive_relayout, midout_iv(0)) {
45 switch (src.layout.dtype.enumv()) {
46#define cb(_dt) \
47 case DTypeEnum::_dt: { \
48 MEGDNN_DISPATCH_CPU_KERN_OPR( \
49 do_copy<DTypeTrait<dtype::_dt>::ctype>(dst, src)); \
50 return; \
51 }
52 MEGDNN_FOREACH_DTYPE_NAME(cb)
53 MEGDNN_FOREACH_PARAMETERIZED_DTYPE(cb)
54#undef cb
55 default:
56 megdnn_throw("bad dtype");
57 }
58 }
59 MIDOUT_END();
60}
61
62void RelayoutForwardImpl::check_cpu_handle(Handle* handle) {
63 megdnn_assert(

Callers

nothing calls this directly

Calls 3

MIDOUT_BEGINFunction · 0.50
enumvMethod · 0.45

Tested by

no test coverage detected