From 451689662688bfb3152f5c2218b70c24b12c5852 Mon Sep 17 00:00:00 2001 From: stefankoncarevic Date: Tue, 6 Oct 2026 18:23:37 +0200 Subject: [PATCH] [CI/Build] Warm the DP engines before measuring load balance in test_load (#60241) Signed-off-by: Stefan Koncarevic --- tests/v1/distributed/test_async_llm_dp.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/v1/distributed/test_async_llm_dp.py b/tests/v1/distributed/test_async_llm_dp.py index cb23910566..ecdef1f38b 100644 --- a/tests/v1/distributed/test_async_llm_dp.py +++ b/tests/v1/distributed/test_async_llm_dp.py @@ -132,6 +132,26 @@ async def test_load( ) after.callback(engine.shutdown) + # The first request an engine serves pays a few hundred milliseconds of + # one-off setup, and while it does the engine holds the requests already + # routed to it while reporting itself idle, which is enough to skew the + # split asserted on below. Pay it on every engine first, then measure. + await asyncio.gather( + *( + generate( + engine, + f"warmup-{rank}", + prompt, + output_kind, + max_tokens=1, + data_parallel_rank=rank, + ) + for rank in range(DP_SIZE) + ) + ) + for sl in stats_loggers.values(): + sl.finished_req_count = 0 + NUM_REQUESTS = 100 NUM_EXPECTED_TOKENS = 10