[Cherry Pick from pr#3981][0.11.0][P/D]Make kv-transfer env variable take effect & Fix load-balance proxy (#3983)
### What this PR does / why we need it? Make kv-transfer env variable take effect & Fix load-balance proxy. Cherry Pick from #3981 --------- Signed-off-by: nwpu-zxr <zhouxuerong2@huawei.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import contextlib
|
||||
import copy
|
||||
import hashlib
|
||||
import math
|
||||
import os
|
||||
import queue
|
||||
import struct
|
||||
import threading
|
||||
@@ -31,6 +32,7 @@ from vllm.v1.core.sched.output import SchedulerOutput
|
||||
import vllm_ascend.envs as envs_ascend
|
||||
from vllm_ascend.ascend_config import get_ascend_config
|
||||
from vllm_ascend.distributed.utils import (align_memory,
|
||||
get_transfer_timeout_value,
|
||||
kv_alltoall_and_rearrange)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -596,6 +598,8 @@ class MooncakeLayerwiseConnectorWorker:
|
||||
|
||||
def __init__(self, vllm_config: VllmConfig, engine_id: str):
|
||||
self._get_prefill_decode_size(vllm_config)
|
||||
os.environ["ASCEND_TRANSFER_TIMEOUT"] = str(
|
||||
get_transfer_timeout_value())
|
||||
if self._prefill_tp_size < self._decode_tp_size:
|
||||
raise ValueError(
|
||||
f"prefill_tp_size: {self._prefill_tp_size} must be greater than"
|
||||
|
||||
Reference in New Issue
Block a user