Skip to content

Commit

Permalink
Fix ClusterResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
frgossen committed Nov 22, 2023
1 parent f8ecbc2 commit fd088d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions benchmarks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

try:
import torch_xla.core.xla_model as xm
from torch_xla.distributed.cluster import ClusterResolver
from torch_xla._internal import tpu
except ImportError:
# ignore the error if torch_xla is not installed
pass
Expand Down Expand Up @@ -150,5 +150,4 @@ def get_gpu_name():


def get_tpu_name():
return ClusterResolver.get_instance_metadata(
'instance/attributes/accelerator-type')
return tpu._get_metadata("accelerator-type")

0 comments on commit fd088d9

Please sign in to comment.