MCPcopy Create free account
hub / github.com/OpenPPL/ppl.nn / FillKernels

Function FillKernels

samples/cpp/engine/demo_engine.cc:33–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33static RetCode FillKernels(const ir::Graph* graph, RuntimePartitionInfo* info) {
34 auto topo = graph->topo.get();
35 for (auto it = topo->CreateNodeIter(); it->IsValid(); it->Forward()) {
36 auto node = it->Get();
37 info->kernels.emplace(node->GetId(), unique_ptr<OptKernel>(new DemoOptKernel(node)));
38 }
39 return RC_SUCCESS;
40}
41
42RetCode DemoEngine::ProcessGraph(const utils::SharedResource&, ir::Graph* graph, RuntimePartitionInfo* info) {
43 auto status = utils::LoadConstants(*graph, &device_, &info->constants);

Callers 1

ProcessGraphMethod · 0.85

Calls 5

CreateNodeIterMethod · 0.45
IsValidMethod · 0.45
ForwardMethod · 0.45
GetMethod · 0.45
GetIdMethod · 0.45

Tested by

no test coverage detected