diff --git a/CHANGELOG.md b/CHANGELOG.md index aacfbf781d2ea..287450f5571a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -583,6 +583,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed `_aggregate_metrics`, `_reduce_agg_metrics`, and `_finalize_agg_metrics` from `LightningLoggerBase` ([#12053](https://github.com/PyTorchLightning/pytorch-lightning/pull/12053)) +- Removed the `AcceleratorConnector.device_type` property ([#12081](https://github.com/PyTorchLightning/pytorch-lightning/pull/12081)) + + ### Fixed - 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) diff --git a/pytorch_lightning/trainer/connectors/accelerator_connector.py b/pytorch_lightning/trainer/connectors/accelerator_connector.py index f2d27a249f6f2..6a52f1eda2fa6 100644 --- a/pytorch_lightning/trainer/connectors/accelerator_connector.py +++ b/pytorch_lightning/trainer/connectors/accelerator_connector.py @@ -763,17 +763,6 @@ def _lazy_init_strategy(self) -> None: def parallel_devices(self) -> List[Union[torch.device, int]]: return self._parallel_devices - @property - def device_type(self) -> str: - if isinstance(self.accelerator, CPUAccelerator): - return "cpu" - if isinstance(self.accelerator, GPUAccelerator): - return "gpu" - if isinstance(self.accelerator, TPUAccelerator): - return "tpu" - if isinstance(self.accelerator, IPUAccelerator): - return "ipu" - @property def num_nodes(self) -> int: return self._num_nodes_flag