From 424b3dc477ef9e8bbaa8bc29acd0310ecaea92db Mon Sep 17 00:00:00 2001 From: Adolfo Victoria Date: Tue, 27 May 2025 23:10:37 -0700 Subject: [PATCH] Respect passed in device overrides in engine args Summary: Signed-off-by: Adolfo Victoria adovi@meta.com When calling `create_engine_config` we don't respect the device set in engine args and instead grab it from the runtime platform directly. This logic is also extraneous since the default behavior (i.e. device=auto) is to set the device to the runtime platform device if auto is passed inside of `__post_init__` inside of `DeviceConfig` Differential Revision: D75496412 --- vllm/engine/arg_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/engine/arg_utils.py b/vllm/engine/arg_utils.py index 442e4100fea1..14ab5358c44e 100644 --- a/vllm/engine/arg_utils.py +++ b/vllm/engine/arg_utils.py @@ -979,7 +979,7 @@ def create_engine_config( from vllm.platforms import current_platform current_platform.pre_register_and_update() - device_config = DeviceConfig(device=current_platform.device_type) + device_config = DeviceConfig(device=self.device) model_config = self.create_model_config() # * If VLLM_USE_V1 is unset, we enable V1 for "supported features"