[Hardware][openvino] is_openvino --> current_platform.is_openvino (#9716)
This commit is contained in:
@@ -318,15 +318,6 @@ def is_hip() -> bool:
|
||||
return torch.version.hip is not None
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def is_openvino() -> bool:
|
||||
from importlib.metadata import PackageNotFoundError, version
|
||||
try:
|
||||
return "openvino" in version("vllm")
|
||||
except PackageNotFoundError:
|
||||
return False
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def get_max_shared_memory_bytes(gpu: int = 0) -> int:
|
||||
"""Returns the maximum shared memory per thread block in bytes."""
|
||||
@@ -757,7 +748,7 @@ def is_pin_memory_available() -> bool:
|
||||
elif current_platform.is_neuron():
|
||||
print_warning_once("Pin memory is not supported on Neuron.")
|
||||
return False
|
||||
elif current_platform.is_cpu() or is_openvino():
|
||||
elif current_platform.is_cpu() or current_platform.is_openvino():
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user