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

Method reset_dest

src/core/impl/graph/static_infer_impl.cpp:1083–1104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1081}
1082
1083void CompSeqManager::reset_dest(CompSeqExtraInfo& info) {
1084 m_static_first_run = true;
1085 m_added.clear();
1086 m_static_infer_const_needed.clear();
1087 m_static_srcnode.clear();
1088 m_static_mid.clear();
1089 info.missing_for_shape.clear();
1090 info.missing_for_value.clear();
1091
1092 for (auto&& i : info.infer_dest) {
1093 mgb_assert(i->tag()->owner_graph() == m_owner_graph);
1094 add_dest(info, static_cast<TagTraitBase*>(i));
1095 }
1096
1097 info.rt_static_infer_src.clear();
1098 for (auto&& i : m_static_srcnode) {
1099 auto trait = i.trait();
1100 if (trait->infer_type() & InferType::RT_STATIC) {
1101 info.rt_static_infer_src.push_back({trait->tag(), trait->handler_type()});
1102 }
1103 }
1104}
1105
1106bool CompSeqManager::update_static_check_shape_change() {
1107 if (m_static_first_run) {

Callers 1

compile_commitMethod · 0.80

Calls 6

infer_typeMethod · 0.80
clearMethod · 0.45
owner_graphMethod · 0.45
tagMethod · 0.45
traitMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected