Lightning-AI/pytorch-lightning · error · MisconfigurationException

HPU is currently not supported. Please contact developer@lig

Error message

HPU is currently not supported. Please contact developer@lightning.ai

What it means

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.

Source

Thrown at src/lightning/pytorch/trainer/connectors/accelerator_connector.py:402

            self._devices_flag = self.accelerator.auto_device_count()

    def _choose_and_init_cluster_environment(self) -> ClusterEnvironment:
        if isinstance(self._cluster_environment_flag, ClusterEnvironment):
            return self._cluster_environment_flag
        for env_type in (
            # TorchElastic has the highest priority since it can also be used inside SLURM
            TorchElasticEnvironment,
            SLURMEnvironment,
            LSFEnvironment,
            MPIEnvironment,
        ):
            if env_type.detect():
                return env_type()
        return LightningEnvironment()

    def _choose_strategy(self) -> Union[Strategy, str]:
        if self._accelerator_flag == "hpu":
            raise MisconfigurationException("HPU is currently not supported. Please contact developer@lightning.ai")

        if self._accelerator_flag == "tpu" or isinstance(self._accelerator_flag, XLAAccelerator):
            if self._parallel_devices and len(self._parallel_devices) > 1:
                return XLAStrategy.strategy_name
            # TODO: lazy initialized device, then here could be self._strategy_flag = "single_xla"
            return SingleDeviceXLAStrategy(device=self._parallel_devices[0])
        if self._num_nodes_flag > 1:
            return "ddp"
        if len(self._parallel_devices) <= 1:
            if isinstance(self._accelerator_flag, (CUDAAccelerator, MPSAccelerator)) or (
                isinstance(self._accelerator_flag, str) and self._accelerator_flag in ("cuda", "gpu", "mps")
            ):
                device = _determine_root_gpu_device(self._parallel_devices)
            else:
                device = "cpu"
            # TODO: lazy initialized device, then here could be self._strategy_flag = "single_device"
            return SingleDeviceStrategy(device=device)  # type: ignore
        if len(self._parallel_devices) > 1 and _IS_INTERACTIVE:

View on GitHub (pinned to 9fed5c27d2)

Solutions

  1. 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
  2. Switch to a supported accelerator (cuda/cpu) if HPU hardware is no longer in use

Example fix

# before
trainer = Trainer(accelerator="hpu")
# after
trainer = Trainer(accelerator="auto")
Defensive patterns

Strategy: fallback

Validate before calling

accelerator = "hpu" if hasattr(torch, "hpu") else "auto"  # note: current Lightning rejects hpu outright
if accelerator == "hpu":
    raise RuntimeError("HPU unsupported in this Lightning version; pin a version that supports it")

Try / catch

from lightning.pytorch.utilities.exceptions import MisconfigurationException
try:
    trainer = Trainer(accelerator="hpu")
except MisconfigurationException as e:
    if "HPU" in str(e):
        trainer = Trainer(accelerator="auto")
    else:
        raise

Prevention

When it happens

Trigger: Trainer(accelerator='hpu') or passing an HPU-related accelerator/strategy on this version of Lightning.

Common situations: Code written for older Lightning + habana_lightning plugins run after an upgrade; leftover HPU branches in shared training scripts.

Related errors


AI-assisted analysis of Lightning-AI/pytorch-lightning@9fed5c27d2 (2026-08-28). Data as JSON: /api/errors/a7ffc22d722f9ee2. Report an issue: GitHub.