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

Method exec

dnn/src/x86/pooling/algo.cpp:105–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void PoolingImpl::AlgoMeanW2S2AVX::exec(const ExecArgs& args) const {
106 auto N = args.layout_src.shape[0];
107 auto C = args.layout_src.shape[1];
108 auto IH = args.layout_src.shape[2];
109 auto IW = args.layout_src.shape[3];
110 auto OH = args.layout_dst.shape[2];
111 auto OW = args.layout_dst.shape[3];
112 auto PH = args.opr->param().pad_h;
113 auto PW = args.opr->param().pad_w;
114
115 auto handle = [=]() { return args.handle; };
116 MEGDNN_DISPATCH_CPU_KERN_OPR(
117 auto sptr = reinterpret_cast<dt_float32*>(args.src_tensor.raw_ptr());
118 auto dptr = reinterpret_cast<dt_float32*>(args.dst_tensor.raw_ptr());
119 rep(n, N) rep(c, C) {
120 mean_pooling_w2x2_s2x2_avx(
121 sptr + n * C * IH * IW + c * IH * IW, IH, IW,
122 dptr + n * C * OH * OW + c * OH * OW, OH, OW, PH, PW, true);
123 });
124}
125
126bool PoolingImpl::AlgoMeanW2S2SSE3::is_available(const SizeArgs& args) const {
127 auto SH = args.opr->param().stride_h;

Callers

nothing calls this directly

Calls 15

mkldnn_engineMethod · 0.80
mkldnn_streamMethod · 0.80
get_descMethod · 0.80
repFunction · 0.50
get_bundleFunction · 0.50
runFunction · 0.50
paramMethod · 0.45
raw_ptrMethod · 0.45

Tested by

no test coverage detected