Skip to content

Commit 27809fe

Browse files
committed
remove AcceleratorConnector.has_ipu
1 parent 29d5afb commit 27809fe

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
589589
- Removed `_aggregate_metrics`, `_reduce_agg_metrics`, and `_finalize_agg_metrics` from `LightningLoggerBase` ([#12053](https://github.com/PyTorchLightning/pytorch-lightning/pull/12053))
590590

591591

592+
- Removed `AcceleratorConnector.has_ipu` property ([#12111](https://github.com/PyTorchLightning/pytorch-lightning/pull/12111))
593+
594+
592595
### Fixed
593596

594597
- Fixed an issue where `HorovodStrategy.teardown()` did not complete gracefully if an exception was thrown during callback setup [#11752](https://github.com/PyTorchLightning/pytorch-lightning/pull/11752)

pytorch_lightning/trainer/connectors/accelerator_connector.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,10 +859,6 @@ def is_distributed(self) -> bool:
859859
is_distributed |= self.strategy.is_distributed
860860
return is_distributed
861861

862-
@property
863-
def has_ipu(self) -> bool:
864-
return isinstance(self.accelerator, IPUAccelerator) and isinstance(self.strategy, IPUStrategy)
865-
866862
@property
867863
def use_ipu(self) -> bool:
868864
return isinstance(self.accelerator, IPUAccelerator)

tests/accelerators/test_accelerator_connector.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,11 +905,9 @@ def test_unsupported_tpu_choice(monkeypatch):
905905
def test_unsupported_ipu_choice(monkeypatch):
906906
import pytorch_lightning.strategies.ipu as ipu
907907
import pytorch_lightning.utilities.imports as imports
908-
from pytorch_lightning.trainer.connectors.accelerator_connector import AcceleratorConnector
909908

910909
monkeypatch.setattr(imports, "_IPU_AVAILABLE", True)
911910
monkeypatch.setattr(ipu, "_IPU_AVAILABLE", True)
912-
monkeypatch.setattr(AcceleratorConnector, "has_ipu", True)
913911
with pytest.raises(MisconfigurationException, match=r"accelerator='ipu', precision='bf16'\)` is not supported"):
914912
Trainer(accelerator="ipu", precision="bf16")
915913
with pytest.raises(MisconfigurationException, match=r"accelerator='ipu', precision=64\)` is not supported"):

0 commit comments

Comments
 (0)