Skip to content

Commit 1f553e0

Browse files
committed
Fixes lint
1 parent 9a0d4dd commit 1f553e0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

torch/nn/parallel/distributed.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -749,12 +749,11 @@ def __init__(
749749
else:
750750
self.process_group = process_group
751751

752-
if (
753-
dist.get_backend(self.process_group) == "nccl"
754-
and torch.cuda.nccl.version() >= (2, 17)
755-
):
752+
if dist.get_backend(
753+
self.process_group
754+
) == "nccl" and torch.cuda.nccl.version() >= (2, 17):
756755
# Note: NVIDIA recommends using CGA Cluster Size of 2 when using DDP.
757-
default_cga = dist.ProcessGroupNCCL.Options().config.cga_cluster_size # type: ignore[attr-defined]
756+
default_cga = dist.ProcessGroupNCCL.Options().config.cga_cluster_size # type: ignore[attr-defined]
758757
default_pg_nccl = self.process_group._get_backend(torch.device("cuda"))
759758
current_cga = default_pg_nccl.options.config.cga_cluster_size
760759
if current_cga == default_cga:

0 commit comments

Comments
 (0)