[Core] Release NCCL communicator memory in sleep mode (#51485)

Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
aoshen02
2026-09-01 14:31:16 +08:00
committed by GitHub
co-authored by aoshen02 Claude Fable 5
parent ec32f669bb
commit 4ac452ad98
12 changed files with 182 additions and 6 deletions
@@ -631,6 +631,14 @@ class CudaCommunicator(DeviceCommunicatorBase):
self.all2all_manager.destroy()
self.all2all_manager = None # type: ignore[assignment]
def suspend(self) -> None:
if self.pynccl_comm is not None:
self.pynccl_comm.suspend()
def resume(self) -> None:
if self.pynccl_comm is not None:
self.pynccl_comm.resume()
def checkpoint_prepare(self) -> None:
# Only FlashInfer all-reduce and FlashInfer all2all are supported for now.
from .flashinfer_all_reduce import checkpoint_prepare_fi_ar_workspaces