diff --git a/imperative/src/impl/physical_tensor.cpp b/imperative/src/impl/physical_tensor.cpp index e596b1f2bbc8c0e8548cde1da952a321391cc1d8..12df60bf472cb405ffe3db1ee13d278372d89326 100644 --- a/imperative/src/impl/physical_tensor.cpp +++ b/imperative/src/impl/physical_tensor.cpp @@ -44,7 +44,7 @@ public: } static CompNodeSyncManager& inst() { - static CompNodeSyncManager sl_inst; + static CompNodeSyncManager* sl_inst = new CompNodeSyncManager(); #if MGB_CUDA && defined(WIN32) //! FIXME: windows cuda driver shutdown before call atexit function even //! register atexit function after init cuda driver! as a workround @@ -55,7 +55,7 @@ public: mgb_assert(!err, "failed to register atexit function"); } #endif - return sl_inst; + return *sl_inst; } CompNode::Event* get_or_create_event(Blob* blob) {