|
27 | 27 | from vllm.v1.core.sched.output import SchedulerOutput |
28 | 28 | from vllm.v1.request import Request, RequestStatus |
29 | 29 |
|
30 | | -from vllm_ascend import envs |
| 30 | +import vllm_ascend.envs as envs_ascend |
31 | 31 | from vllm_ascend.utils import AscendSocVersion, get_ascend_soc_version |
32 | 32 |
|
33 | 33 | TORCH_DTYPE_TO_NPU_DTYPE = { |
@@ -181,7 +181,7 @@ def __init__(self, vllm_config: VllmConfig, engine_id: Optional[str]): |
181 | 181 | dp_rank_local = self.vllm_config.parallel_config.data_parallel_rank_local |
182 | 182 | tp_size = self.vllm_config.parallel_config.tensor_parallel_size |
183 | 183 |
|
184 | | - self.port = dp_rank_local * tp_size + envs.VLLM_LLMDD_RPC_PORT if dp_rank_local is not None else tp_size + envs.VLLM_LLMDD_RPC_PORT |
| 184 | + self.port = dp_rank_local * tp_size + envs_ascend.VLLM_LLMDD_RPC_PORT if dp_rank_local is not None else tp_size + envs_ascend.VLLM_LLMDD_RPC_PORT |
185 | 185 |
|
186 | 186 | self._reqs_need_recv: dict[str, tuple[Request, list[int]]] = {} |
187 | 187 |
|
@@ -344,7 +344,7 @@ def __init__(self, vllm_config: VllmConfig): |
344 | 344 |
|
345 | 345 | def listen_for_agent_metadata_req(self, event: threading.Event): |
346 | 346 | assert self.local_agent_metadata is not None |
347 | | - port = envs.VLLM_LLMDD_RPC_PORT + self.local_dp_rank * self.tp_size + self.tp_rank if self.local_dp_rank is not None else envs.VLLM_LLMDD_RPC_PORT + self.tp_size + self.tp_rank |
| 347 | + port = envs_ascend.VLLM_LLMDD_RPC_PORT + self.local_dp_rank * self.tp_size + self.tp_rank if self.local_dp_rank is not None else envs_ascend.VLLM_LLMDD_RPC_PORT + self.tp_size + self.tp_rank |
348 | 348 | url = f"tcp://0.0.0.0:{port}" |
349 | 349 | msg_encoder = msgspec.msgpack.Encoder() |
350 | 350 | msg_decoder = msgspec.msgpack.Decoder() |
@@ -427,9 +427,9 @@ def init_llm_datadist(self): |
427 | 427 |
|
428 | 428 | def read_offline_rank_table(self): |
429 | 429 | assert ( |
430 | | - envs.DISAGGREGATED_PREFILL_RANK_TABLE_PATH |
| 430 | + envs_ascend.DISAGGREGATED_PREFILL_RANK_TABLE_PATH |
431 | 431 | ), "Please set path of rank_table to env variable DISAGGREGATED_PREFILL_RANK_TABLE_PATH" |
432 | | - rank_table_path = envs.DISAGGREGATED_PREFILL_RANK_TABLE_PATH |
| 432 | + rank_table_path = envs_ascend.DISAGGREGATED_PREFILL_RANK_TABLE_PATH |
433 | 433 | with open(rank_table_path, "r", encoding="utf-8") as f: |
434 | 434 | global_rank_table = json.load(f) |
435 | 435 | decode_device_list = global_rank_table["decode_device_list"] |
|
0 commit comments