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 dd9eb49 commit e7c3bbfCopy full SHA for e7c3bbf
pytorch_lightning/trainer/connectors/accelerator_connector.py
@@ -75,6 +75,9 @@
75
76
log = logging.getLogger(__name__)
77
78
+if _HOROVOD_AVAILABLE:
79
+ import horovod.torch as hvd
80
+
81
82
class AcceleratorConnector:
83
def __init__(
@@ -562,8 +565,6 @@ def handle_horovod(self):
562
565
"Install with \n $HOROVOD_WITH_PYTORCH=1 pip install horovod[pytorch]"
563
566
)
564
567
- import horovod.torch as hvd
-
568
hvd.init()
569
if isinstance(self.accelerator, GPUAccelerator):
570
# Horovod assigns one local GPU per process
0 commit comments