@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a403d0fa41
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Misc] Remove unnecessary `_send_reconfig_message()` in `core_client.py` (#23127)

Signed-off-by: Nick Hill <nhill@redhat.com>

Nick Hill committed Aug 27, 2025 at 05:50 UTC a403d0fa41cc68e3b6da4e1097dc896fde2f1a6a
1 file changed +9 -22
vllm/v1/engine/core_client.py
+9 -22
@@ -1190,21 +1190,6 @@ class DPLBAsyncMPClient(DPAsyncMPClient):
1190 await self._send_input(EngineCoreRequestType.ABORT, request_ids,
1191 engine)
1192
1193 - async def _send_reconfig_message(
1194 - self, reconfig_request: ReconfigureDistributedRequest,
1195 - engine: EngineIdentity) -> asyncio.Future:
1196 - """Send reconfiguration message and return the result future without
1197 - waiting for completion."""
1198 - call_id = uuid.uuid1().int >> 64
1199 - future = asyncio.get_running_loop().create_future()
1200 - self.utility_results[call_id] = future
1201 - message = (EngineCoreRequestType.UTILITY.value, *self.encoder.encode(
1202 - (self.client_index, call_id, "reinitialize_distributed",
1203 - (reconfig_request, ))))
1204 - await self._send_input_message(message, engine, reconfig_request)
1205 - self._ensure_output_queue_task()
1206 - return future
1207 -
1193 async def scale_elastic_ep(self, new_data_parallel_size: int) -> None:
1194 """Scale elastic EP data parallel size"""
1195 cur_data_parallel_size = len(self.core_engines)
@@ -1214,7 +1199,7 @@ class DPLBAsyncMPClient(DPAsyncMPClient):
1199 f"different from cur_data_parallel_size {cur_data_parallel_size}")
1200
1201 assert self.vllm_config.parallel_config.data_parallel_backend == \
1217 - "ray", ("Only ray DP backend supports scaling elastic EP")
1202 + "ray", "Only ray DP backend supports scaling elastic EP"
1203
1204 scale_up = new_data_parallel_size > cur_data_parallel_size
1205
@@ -1246,9 +1231,10 @@ class DPLBAsyncMPClient(DPAsyncMPClient):
1231 data_parallel_master_ip,
1232 new_data_parallel_master_port=self.vllm_config.parallel_config.
1233 data_parallel_master_port)
1249 - future = await self._send_reconfig_message(reconfig_request,
1250 - engine)
1251 - reconfig_futures.append(future)
1234 + coro = self._call_utility_async("reinitialize_distributed",
1235 + reconfig_request,
1236 + engine=engine)
1237 + reconfig_futures.append(asyncio.create_task(coro))
1238
1239 logger.info("All reconfigure messages sent, starting engine creation")
1240
@@ -1318,9 +1304,10 @@ class DPLBAsyncMPClient(DPAsyncMPClient):
1304 if cur_dp_rank >= new_data_parallel_size:
1305 reconfig_request.new_data_parallel_rank = \
1306 ReconfigureRankType.SHUTDOWN_CURRENT_RANK
1321 - future = await self._send_reconfig_message(reconfig_request,
1322 - engine)
1323 - reconfig_futures.append(future)
1307 + coro = self._call_utility_async("reinitialize_distributed",
1308 + reconfig_request,
1309 + engine=engine)
1310 + reconfig_futures.append(asyncio.create_task(coro))
1311
1312 for _ in range(new_data_parallel_size, cur_data_parallel_size):
1313 self.core_engines.pop()