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

Method modify_endpoint_vars

src/core/impl/graph/seq_sublinear_memory.cpp:1029–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027}
1028
1029void SeqModifierForSublinearMemory::modify_endpoint_vars(VarNodeArray& endpoints) {
1030 auto comp_seq = MemoryOptimizerHelper::CompSeq(owner_graph(), endpoints);
1031 reset_opr_seq(*comp_seq.m_seq);
1032 for (auto&& i : endpoints) {
1033 auto iter = var_map().find(i);
1034 if (iter != var_map().end()) {
1035 i = iter->second;
1036 }
1037 }
1038}
1039
1040void SeqModifierForSublinearMemory::sanity_check(const OprNodeArray& opr_seq) {
1041 OperatorNodeBase* first_bad_opr = nullptr;

Callers

nothing calls this directly

Calls 3

CompSeqClass · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected