Release CUDA Graphs resource before exit.

This commit is contained in:
jinghuan-Chen
2025-06-18 16:17:31 +08:00
parent 4fc764f175
commit ffafaeb133

View File

@@ -53,6 +53,9 @@ class ModelRunner:
dist.barrier() dist.barrier()
if self.rank == 0: if self.rank == 0:
self.shm.unlink() self.shm.unlink()
if not self.enforce_eager:
del self.graphs, self.graph_pool
torch.cuda.synchronize()
dist.destroy_process_group() dist.destroy_process_group()
def loop(self): def loop(self):