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

Function eval_conv_cpu

src/core/test/graph/multi_thread.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32template <typename Opr>
33HostTensorND eval_conv_cpu(
34 const HostTensorND& xv, const HostTensorND& fv,
35 const typename Opr::Param& param = {}) {
36 auto cn = CompNode::load("cpux");
37 auto src = std::make_shared<HostTensorND>(cn, xv.layout()),
38 filter = std::make_shared<HostTensorND>(cn, fv.layout());
39 memcpy(src->raw_ptr(), xv.raw_ptr(), xv.layout().span().dist_byte());
40 memcpy(filter->raw_ptr(), fv.raw_ptr(), fv.layout().span().dist_byte());
41 return eval_conv<Opr>(src, filter, param);
42}
43} // namespace
44
45TEST(TestGraph, AsyncExecLevel) {

Callers

nothing calls this directly

Calls 5

dist_byteMethod · 0.80
spanMethod · 0.80
loadFunction · 0.50
layoutMethod · 0.45
raw_ptrMethod · 0.45

Tested by

no test coverage detected