We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c623757 commit f64842cCopy full SHA for f64842c
pytorch_lightning/trainer/connectors/accelerator_connector.py
@@ -857,7 +857,7 @@ def check_horovod(self):
857
@staticmethod
858
def has_horovodrun() -> bool:
859
"""Returns True if running with `horovodrun` using Gloo or OpenMPI."""
860
- return "OMPI_COMM_WORLD_RANK" in os.environ or "HOROVOD_RANK" in os.environ
+ return _HOROVOD_AVAILABLE and ("OMPI_COMM_WORLD_RANK" in os.environ or "HOROVOD_RANK" in os.environ)
861
862
def update_device_type_if_ipu_plugin(self) -> None:
863
# This allows the poptorch.Options that are passed into the IPUPlugin to be the source of truth,
0 commit comments