Unverified Commit 9cf47594 authored by Mengqing Cao's avatar Mengqing Cao Committed by GitHub
Browse files

[executor] init `local_rank` as device index (#13027)


Signed-off-by: default avatarMengqing Cao <cmq0113@163.com>
parent 41c5dd45
......@@ -28,6 +28,11 @@ class UniProcExecutor(ExecutorBase):
distributed_init_method = get_distributed_init_method(
get_ip(), get_open_port())
local_rank = 0
# set local rank as the device index if specified
device_info = self.vllm_config.device_config.device.__str__().split(
":")
if len(device_info) > 1:
local_rank = int(device_info[1])
rank = 0
kwargs = dict(
vllm_config=self.vllm_config,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment