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

Function eval_conv

src/core/test/comp_node_helper.h:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11template <typename Opr>
12HostTensorND eval_conv(
13 const std::shared_ptr<HostTensorND>& src,
14 const std::shared_ptr<HostTensorND>& filter,
15 const typename Opr::Param& param = {}) {
16 auto graph = ComputingGraph::make();
17 graph->options().log_level = 0;
18 SymbolVar x = opr::Host2DeviceCopy::make(*graph, src);
19 SymbolVar y = opr::Host2DeviceCopy::make(*graph, filter);
20 SymbolVar z = Opr::make(x, y, param);
21 HostTensorND host_z;
22 auto func = graph->compile({make_callback_copy(z, host_z)});
23 func->execute();
24
25 host_z.sync();
26 return host_z;
27}
28
29template <typename Opr>
30HostTensorND eval_conv_cpu(

Callers

nothing calls this directly

Calls 5

make_callback_copyFunction · 0.85
makeFunction · 0.70
compileMethod · 0.45
executeMethod · 0.45
syncMethod · 0.45

Tested by

no test coverage detected