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

Method init_layout_constraint

src/core/impl/graph/var_node_mem_mgr.cpp:922–943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920}
921
922void VarNodeMemManager::init_layout_constraint() {
923 for (auto&& i : m_node_mem_trait) {
924 i.second.layout_constraint.level = LayoutConstraintLevel::NONE;
925 i.second.layout_constraint.custom.clear();
926 }
927
928 {
929 OperatorNodeBase* opr = nullptr;
930 MGB_MARK_USED_VAR(opr);
931 MGB_TRY {
932 for (auto i : *m_opr_seq) {
933 opr = i;
934 i->add_input_layout_constraint();
935 }
936 }
937 MGB_CATCH(MegBrainError & exc, {
938 if (!exc.extra_info() && opr)
939 OperatorNodeExcExtraInfo::record(opr, exc);
940 throw;
941 })
942 }
943}
944
945void VarNodeMemManager::init_sys_alloc_info(CompSeqExtraInfo& extra_info) {
946 auto&& infer_mgr = m_owner_graph->static_infer_manager_impl();

Calls 4

extra_infoMethod · 0.80
MGB_CATCHFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected