{"record":{"id":"a7ffc22d722f9ee2","repo":"Lightning-AI/pytorch-lightning","slug":"hpu-is-currently-not-supported-please-contact-dev","errorCode":null,"errorMessage":"HPU is currently not supported. Please contact developer@lightning.ai","messagePattern":"HPU is currently not supported\\. Please contact developer@lightning\\.ai","errorType":"validation","errorClass":"MisconfigurationException","httpStatus":null,"severity":"error","filePath":"src/lightning/pytorch/trainer/connectors/accelerator_connector.py","lineNumber":402,"sourceCode":"            self._devices_flag = self.accelerator.auto_device_count()\n\n    def _choose_and_init_cluster_environment(self) -> ClusterEnvironment:\n        if isinstance(self._cluster_environment_flag, ClusterEnvironment):\n            return self._cluster_environment_flag\n        for env_type in (\n            # TorchElastic has the highest priority since it can also be used inside SLURM\n            TorchElasticEnvironment,\n            SLURMEnvironment,\n            LSFEnvironment,\n            MPIEnvironment,\n        ):\n            if env_type.detect():\n                return env_type()\n        return LightningEnvironment()\n\n    def _choose_strategy(self) -> Union[Strategy, str]:\n        if self._accelerator_flag == \"hpu\":\n            raise MisconfigurationException(\"HPU is currently not supported. Please contact developer@lightning.ai\")\n\n        if self._accelerator_flag == \"tpu\" or isinstance(self._accelerator_flag, XLAAccelerator):\n            if self._parallel_devices and len(self._parallel_devices) > 1:\n                return XLAStrategy.strategy_name\n            # TODO: lazy initialized device, then here could be self._strategy_flag = \"single_xla\"\n            return SingleDeviceXLAStrategy(device=self._parallel_devices[0])\n        if self._num_nodes_flag > 1:\n            return \"ddp\"\n        if len(self._parallel_devices) <= 1:\n            if isinstance(self._accelerator_flag, (CUDAAccelerator, MPSAccelerator)) or (\n                isinstance(self._accelerator_flag, str) and self._accelerator_flag in (\"cuda\", \"gpu\", \"mps\")\n            ):\n                device = _determine_root_gpu_device(self._parallel_devices)\n            else:\n                device = \"cpu\"\n            # TODO: lazy initialized device, then here could be self._strategy_flag = \"single_device\"\n            return SingleDeviceStrategy(device=device)  # type: ignore\n        if len(self._parallel_devices) > 1 and _IS_INTERACTIVE:","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/Lightning-AI/pytorch-lightning/blob/9fed5c27d2a62ff0efd6c3573599921d6ff67c14/src/lightning/pytorch/trainer/connectors/accelerator_connector.py#L384-L420","documentation":"Intel Habana HPU acceleration was removed/unsupported in this Lightning version; requesting accelerator='hpu' raises immediately with a contact address. It is a hard support statement rather than a runtime capability check.","triggerScenarios":"Trainer(accelerator='hpu') or passing an HPU-related accelerator/strategy on this version of Lightning.","commonSituations":"Code written for older Lightning + habana_lightning plugins run after an upgrade; leftover HPU branches in shared training scripts.","solutions":["Upgrade/downgrade to a Lightning version with HPU support (e.g. the 2.x releases with Intel extensions) or use the intel-extension-for-pytorch provided integrations","Switch to a supported accelerator (cuda/cpu) if HPU hardware is no longer in use"],"exampleFix":"# before\ntrainer = Trainer(accelerator=\"hpu\")\n# after\ntrainer = Trainer(accelerator=\"auto\")","handlingStrategy":"fallback","validationCode":"accelerator = \"hpu\" if hasattr(torch, \"hpu\") else \"auto\"  # note: current Lightning rejects hpu outright\nif accelerator == \"hpu\":\n    raise RuntimeError(\"HPU unsupported in this Lightning version; pin a version that supports it\")","typeGuard":null,"tryCatchPattern":"from lightning.pytorch.utilities.exceptions import MisconfigurationException\ntry:\n    trainer = Trainer(accelerator=\"hpu\")\nexcept MisconfigurationException as e:\n    if \"HPU\" in str(e):\n        trainer = Trainer(accelerator=\"auto\")\n    else:\n        raise","preventionTips":["Remove HPU branches when upgrading Lightning","Pin lightning versions matching your hardware stack"],"tags":["pytorch-lightning","hpu","unsupported-feature"],"backgroundTag":"unsupported-hardware-backend","analyzedSha":"9fed5c27d2a62ff0efd6c3573599921d6ff67c14","analyzedAt":"2026-08-28T11:52:41.083Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}