提交 51676939 编写于 作者: M Megvii Engine Team

fix(mge/imperative): fix proxy graph comp_node finalize

GitOrigin-RevId: 22ad0d0fc612f3dd6d3060a344a0feeb072dd026
上级 13e6ea34
...@@ -364,6 +364,7 @@ class ProxyGraph::ProxyGraphImpl : public cg::ComputingGraph { ...@@ -364,6 +364,7 @@ class ProxyGraph::ProxyGraphImpl : public cg::ComputingGraph {
ProxyGraph* m_owner; ProxyGraph* m_owner;
MemPool<VarNode> m_var_node_pool; MemPool<VarNode> m_var_node_pool;
std::vector<std::unique_ptr<OperatorNodeBase>> m_opr_refkeeper; std::vector<std::unique_ptr<OperatorNodeBase>> m_opr_refkeeper;
std::mutex m_opr_refkeeper_mtx;
CompNode::UnorderedSet m_used_comp_node; CompNode::UnorderedSet m_used_comp_node;
VarReceiverInfo m_var_receiver_info; VarReceiverInfo m_var_receiver_info;
public: public:
...@@ -431,7 +432,7 @@ public: ...@@ -431,7 +432,7 @@ public:
} }
std::shared_ptr<void> on_comp_node_finalize() override { std::shared_ptr<void> on_comp_node_finalize() override {
// FIXME: mutex MGB_LOCK_GUARD(m_opr_refkeeper_mtx);
mgb_assert(!m_owner->m_cur_opr); mgb_assert(!m_owner->m_cur_opr);
// finalize would do sync first // finalize would do sync first
m_opr_refkeeper.clear(); m_opr_refkeeper.clear();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册