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

Function eval_conv

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

Source from the content-addressed store, hash-verified

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