Unverified Commit 0267fef5 authored by youkaichao's avatar youkaichao Committed by GitHub
Browse files

[Core] fix del of communicator (#3702)

parent 4716a32d
...@@ -252,5 +252,7 @@ class NCCLCommunicator: ...@@ -252,5 +252,7 @@ class NCCLCommunicator:
assert result == 0 assert result == 0
def __del__(self): def __del__(self):
dist.destroy_process_group() # `dist` module might have been already destroyed
if hasattr(dist, 'destroy_process_group'):
dist.destroy_process_group()
_c_ncclCommDestroy(self.comm) _c_ncclCommDestroy(self.comm)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment