Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Comment thread
hsubramony marked this conversation as resolved.
else:
self.distributed_type = GaudiDistributedType.NO
self.num_processes = 1
Expand Down