Skip to content

Commit d7c6274

Browse files
committed
2/n Consolidate collective functions - collective base and subclasses
1 parent 4cf7d3b commit d7c6274

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
116116
- Added `inference_mode` for evaluation and prediction ([8813](https://github.com/PyTorchLightning/pytorch-lightning/pull/8813))
117117

118118

119+
- Add collective base class and subclasses ([#9414](https://github.com/PyTorchLightning/pytorch-lightning/pull/9414))
120+
121+
119122
### Changed
120123

121124
- Parsing of the `gpus` Trainer argument has changed: `gpus="n"` (str) no longer selects the GPU index n and instead selects the first n devices. ([#8770](https://github.com/PyTorchLightning/pytorch-lightning/pull/8770))

pytorch_lightning/plugins/collective/horovod_collective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434
class HorovodCollective(Collective):
35-
"""Base class for collective functions for training type plugins."""
35+
"""Collective interface for Horovod training type plugins."""
3636

3737
def __init__(
3838
self,

pytorch_lightning/plugins/collective/single_device_collective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
class SingleNodeCollective(Collective):
22-
"""Base class for collective functions for training type plugins."""
22+
"""Collective interface for single device training type plugins."""
2323

2424
def barrier(self, name: Optional[str] = None, *args, **kwargs) -> None:
2525
"""Forces all possibly joined processes to wait for each other."""

pytorch_lightning/plugins/collective/tpu_collective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
class TPUCollective(Collective):
32-
"""Base class for collective functions for training type plugins."""
32+
"""Collective interface for TPU and TPUSpawning training type plugins."""
3333

3434
def barrier(self, name: Optional[str] = None) -> None:
3535
if self.is_distributed:

0 commit comments

Comments
 (0)