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

Method set_priority

src/core/impl/graph/memory_optimizer.cpp:17–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void MemoryOptimizerHelper::set_priority(OperatorNodeBase* opr, int pri) {
18 int& val = opr->node_prop().attribute().priority;
19 m_saved_priority.insert({opr, val});
20 val = pri;
21}
22
23void MemoryOptimizerHelper::set_priority_before_opt(const VarNodeArray& endpoints) {
24 mgb_assert(!m_graph_option_changed, "restore_graph_option() not called");

Callers 2

apply_actionMethod · 0.80
apply_actionMethod · 0.80

Calls 2

attributeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected