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

Method update

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

Source from the content-addressed store, hash-verified

1009};
1010
1011std::pair<bool, bool> CompSeqManager::VersionedTagTrait::update(
1012 bool recomp_mutable_srcnode) {
1013 auto rst = m_trait->infer(recomp_mutable_srcnode, false);
1014 auto version = m_trait->infer_result_version();
1015
1016 if (version != m_version) {
1017 bool shp = false;
1018 if (m_trait->handler_type() == TagHandlerType::SHAPE) {
1019 m_trait->tag()->shape(rst->shape());
1020 shp = true;
1021 }
1022 m_version = version;
1023 return {true, shp};
1024 }
1025
1026 return {false, false};
1027}
1028
1029CompSeqManager::CompSeqManager(ComputingGraph* graph) : m_owner_graph(graph) {}
1030

Callers 1

Calls 3

inferMethod · 0.45
shapeMethod · 0.45
tagMethod · 0.45

Tested by

no test coverage detected