Skip to content

Commit d522cb4

Browse files
author
yexin
committed
fix bug of pg resource leak
1 parent c2a6648 commit d522cb4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

checkpoint_engine/distributed/hccl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ def destroy_process_group(
228228
return
229229

230230
self.pyhccl.destroy_comm()
231+
self.pyhccl = None
232+
self.pg = None
231233
self.initialized = False
232234

233235

checkpoint_engine/distributed/nccl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def destroy_process_group(
146146
return
147147

148148
self.pynccl.destroy_comm()
149-
150149
self.pynccl = None
151150
self.pg = None
152151
self.initialized = False

0 commit comments

Comments
 (0)