mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-27 07:15:15 +08:00
[executor] init local_rank as device index (#13027)
Signed-off-by: Mengqing Cao <cmq0113@163.com>
This commit is contained in:
parent
41c5dd45b9
commit
9cf4759493
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user