[Hardware][Intel] OpenVINO vLLM backend (#5379)
This commit is contained in:
@@ -504,12 +504,14 @@ class EngineArgs:
|
||||
'Enabling this will use the fully sharded layers. '
|
||||
'At high sequence length, max rank or '
|
||||
'tensor parallel size, this is likely faster.'))
|
||||
parser.add_argument(
|
||||
"--device",
|
||||
type=str,
|
||||
default=EngineArgs.device,
|
||||
choices=["auto", "cuda", "neuron", "cpu", "tpu", "xpu"],
|
||||
help='Device type for vLLM execution.')
|
||||
parser.add_argument("--device",
|
||||
type=str,
|
||||
default=EngineArgs.device,
|
||||
choices=[
|
||||
"auto", "cuda", "neuron", "cpu", "openvino",
|
||||
"tpu", "xpu"
|
||||
],
|
||||
help='Device type for vLLM execution.')
|
||||
|
||||
# Related to Vision-language models such as llava
|
||||
parser = EngineArgs.add_cli_args_for_vlm(parser)
|
||||
|
||||
@@ -393,6 +393,12 @@ class AsyncLLMEngine:
|
||||
"Distributed execution is not supported with the CPU backend.")
|
||||
from vllm.executor.cpu_executor import CPUExecutorAsync
|
||||
executor_class = CPUExecutorAsync
|
||||
elif engine_config.device_config.device_type == "openvino":
|
||||
assert distributed_executor_backend is None, (
|
||||
"Distributed execution is not supported with "
|
||||
"the OpenVINO backend.")
|
||||
from vllm.executor.openvino_executor import OpenVINOExecutorAsync
|
||||
executor_class = OpenVINOExecutorAsync
|
||||
elif engine_config.device_config.device_type == "xpu":
|
||||
if distributed_executor_backend is None:
|
||||
from vllm.executor.xpu_executor import XPUExecutorAsync
|
||||
|
||||
@@ -363,6 +363,9 @@ class LLMEngine:
|
||||
elif engine_config.device_config.device_type == "cpu":
|
||||
from vllm.executor.cpu_executor import CPUExecutor
|
||||
executor_class = CPUExecutor
|
||||
elif engine_config.device_config.device_type == "openvino":
|
||||
from vllm.executor.openvino_executor import OpenVINOExecutor
|
||||
executor_class = OpenVINOExecutor
|
||||
elif engine_config.device_config.device_type == "xpu":
|
||||
if distributed_executor_backend == "ray":
|
||||
initialize_ray_cluster(engine_config.parallel_config)
|
||||
|
||||
Reference in New Issue
Block a user