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

Method get_prev_action

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

Source from the content-addressed store, hash-verified

101};
102
103void SeqModifierForSublinearMemory::ModifyActionPlanner::get_prev_action(
104 SeqModifyAction& action) {
105 action.clear();
106 for (auto&& opr : seq()) {
107 auto&& arr = opr->oprs_insert_before;
108 if (arr.empty())
109 continue;
110 auto&& dest = action[opr->orig_opr];
111 dest.reserve(arr.size());
112 for (auto&& i : opr->oprs_insert_before)
113 dest.push_back(i->orig_opr);
114 }
115}
116
117size_t SeqModifierForSublinearMemory::ModifyActionPlanner::get_memory_bottleneck(
118 const SplitPointSet& split_point_set) {

Callers 3

search_refineMethod · 0.80

Calls 5

clearMethod · 0.45
emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected