Revert "Add index to HPU devices (#7497)" (#7545)

This reverts commit 047a7599d24622dfb37fa5e5a32c671b1bb44233.

Unfortunately, the above required substantial redesign of existing HPU
stack, which is currently not feasible, so reverting.

Signed-off-by: Max Kovalenko <mkovalenko@habana.ai>
Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
This commit is contained in:
Max Kovalenko
2025-09-09 01:07:55 +03:00
committed by GitHub
parent b82ef716c8
commit 450b965efb

View File

@ -54,9 +54,8 @@ class HPU_Accelerator(DeepSpeedAccelerator):
return True
def device_name(self, device_index=None):
if device_index is None:
return self._name
return '{}:{}'.format(self._name, device_index)
# ignoring device_index.
return 'hpu'
def device(self, device_index=None):
return torch.device(self.device_name(device_index))