[Hardware][openvino] is_openvino --> current_platform.is_openvino (#9716)
This commit is contained in:
@@ -65,6 +65,13 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
is_openvino = False
|
||||
try:
|
||||
from importlib.metadata import version
|
||||
is_openvino = "openvino" in version("vllm")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if is_tpu:
|
||||
# people might install pytorch built with cuda but run on tpu
|
||||
# so we need to check tpu first
|
||||
@@ -85,6 +92,9 @@ elif is_cpu:
|
||||
elif is_neuron:
|
||||
from .neuron import NeuronPlatform
|
||||
current_platform = NeuronPlatform()
|
||||
elif is_openvino:
|
||||
from .openvino import OpenVinoPlatform
|
||||
current_platform = OpenVinoPlatform()
|
||||
else:
|
||||
current_platform = UnspecifiedPlatform()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user