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

Function eval_conv_cpu

src/core/test/comp_node_helper.h:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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