[hardware] unify usage of is_tpu to current_platform.is_tpu() (#7102)
This commit is contained in:
@@ -333,15 +333,6 @@ def is_neuron() -> bool:
|
||||
return transformers_neuronx is not None
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def is_tpu() -> bool:
|
||||
try:
|
||||
import libtpu
|
||||
except ImportError:
|
||||
libtpu = None
|
||||
return libtpu is not None
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def is_xpu() -> bool:
|
||||
from importlib.metadata import PackageNotFoundError, version
|
||||
|
||||
Reference in New Issue
Block a user