mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-16 15:17:15 +08:00
Fix is_tpu
This commit is contained in:
parent
21f35c2289
commit
d2c6a32c0c
@ -141,7 +141,11 @@ def is_neuron() -> bool:
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def is_tpu() -> bool:
|
||||
return importlib.util.find_spec("libtpu") is not None
|
||||
try:
|
||||
import libtpu
|
||||
except ImportError:
|
||||
libtpu = None
|
||||
return libtpu is not None
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user