optimized context test time consumption (#446)

This commit is contained in:
Frank Lee
2022-03-17 14:40:52 +08:00
committed by GitHub
parent 496cbb0760
commit b72b8445c6
8 changed files with 169 additions and 357 deletions

View File

@@ -449,6 +449,7 @@ class ParallelContext:
dist.destroy_process_group(group)
# destroy global process group
dist.destroy_process_group()
self._groups.clear()
def set_device(self, device_ordinal: int = None):
"""Sets distributed processes to be bound to devices.