[distributed] remove pynccl's redundant change_state (#11749)

This commit is contained in:
cennn
2025-01-06 09:05:48 +08:00
committed by GitHub
parent 33fc1e2e86
commit 9e764e7b10
3 changed files with 28 additions and 62 deletions
+1 -8
View File
@@ -305,14 +305,7 @@ class GroupCoordinator:
stream.wait_stream(curr_stream)
with torch.cuda.stream(stream), maybe_ca_context:
pynccl_comm = self.pynccl_comm
maybe_pynccl_context: Any
if not pynccl_comm:
maybe_pynccl_context = nullcontext()
else:
maybe_pynccl_context = pynccl_comm.change_state()
with maybe_pynccl_context:
yield graph_capture_context
yield graph_capture_context
def all_reduce(self, input_: torch.Tensor) -> torch.Tensor:
"""