Skip to content

Commit a6d9532

Browse files
awaelchlicarmocca
andcommitted
Override broadcast_object_list for torch<1.8 (#7592)
Co-authored-by: Carlos Mocholi <[email protected]>
1 parent 4fba85c commit a6d9532

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
1010
### Fixed
1111

1212
- Fixed `ProgressBar` pickling after calling `trainer.predict` ([#7608](https://github.com/PyTorchLightning/pytorch-lightning/pull/7608))
13-
13+
- Fixed broadcasting in multi-node, multi-gpu DDP using torch 1.7 ([#7592](https://github.com/PyTorchLightning/pytorch-lightning/pull/7592))
1414

1515
## [1.3.2] - 2021-05-18
1616

pytorch_lightning/overrides/torch_distributed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import torch
55

6-
from pytorch_lightning.utilities.imports import _TORCH_GREATER_EQUAL_1_7
6+
from pytorch_lightning.utilities.imports import _TORCH_GREATER_EQUAL_1_8
77

88
log = logging.getLogger(__name__)
99

@@ -88,7 +88,7 @@ def _broadcast_object_list(object_list, src=0, group=None):
8888
object_list[i] = _tensor_to_object(obj_view, obj_size)
8989

9090

91-
if _TORCH_GREATER_EQUAL_1_7 and torch.distributed.is_available():
91+
if _TORCH_GREATER_EQUAL_1_8 and torch.distributed.is_available():
9292
from torch.distributed.distributed_c10d import broadcast_object_list
9393
else:
9494
broadcast_object_list = _broadcast_object_list

0 commit comments

Comments
 (0)