mirror of
https://github.com/deepspeedai/DeepSpeed.git
synced 2025-10-20 15:33:51 +08:00
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:
@ -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))
|
||||
|
Reference in New Issue
Block a user