Skip to content

Commit

Permalink
Remove hpu:X notation untill fully supported by bridge (huggingface#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubramony authored and Jinyan chen committed Feb 27, 2024
1 parent 1996e05 commit 2f9ebae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/habana/accelerate/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def __init__(self, cpu: bool = False, **kwargs):
self.process_index = rank
self.local_process_index = local_rank
if self.device is None:
self.device = torch.device("hpu", self.local_process_index)
# TODO: replace by `torch.device("hpu", self.local_process_index)` when hpu:x is supported
self.device = torch.device("hpu")
else:
self.distributed_type = GaudiDistributedType.NO
self.num_processes = 1
Expand Down

0 comments on commit 2f9ebae

Please sign in to comment.