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

fix(imperative): fix CompNodeSyncManager deconstruct

GitOrigin-RevId: 4beb0d5522bec1cc5191bb7cee51831a9fe6c9d9
上级 618c77c0
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
} }
static CompNodeSyncManager& inst() { static CompNodeSyncManager& inst() {
static CompNodeSyncManager sl_inst; static CompNodeSyncManager* sl_inst = new CompNodeSyncManager();
#if MGB_CUDA && defined(WIN32) #if MGB_CUDA && defined(WIN32)
//! FIXME: windows cuda driver shutdown before call atexit function even //! FIXME: windows cuda driver shutdown before call atexit function even
//! register atexit function after init cuda driver! as a workround //! register atexit function after init cuda driver! as a workround
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
mgb_assert(!err, "failed to register atexit function"); mgb_assert(!err, "failed to register atexit function");
} }
#endif #endif
return sl_inst; return *sl_inst;
} }
CompNode::Event* get_or_create_event(Blob* blob) { CompNode::Event* get_or_create_event(Blob* blob) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册