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

Function _set_priority_to_id

imperative/python/src/graph_rt.cpp:105–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void _set_priority_to_id(const std::vector<mgb::cg::VarNode*>& dest_vars) {
106 auto on_opr = [](mgb::cg::OperatorNodeBase* opr) {
107 if (opr->node_prop().attribute().priority == 0) {
108 opr->node_prop().attribute().priority = opr->id();
109 }
110 };
111 mgb::cg::DepOprIter dep_iter{on_opr};
112 for (const auto& var : dest_vars) {
113 dep_iter.add(SymbolVar(var));
114 }
115}
116
117py::object Py_Varnode = py::none();
118const std::unique_ptr<mgb::OprFootprint> _imperative_sm_opr_footprint_ptr{

Callers 1

dumpMethod · 0.85

Calls 4

SymbolVarClass · 0.85
attributeMethod · 0.45
idMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected