[Bugfix] Defer adaptive verification until after kernel warmup (#55455)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Kevin H. Luu
2026-09-06 11:31:40 -07:00
committed by GitHub
co-authored by Codex
parent 722d169339
commit 6865e67f0b
3 changed files with 38 additions and 0 deletions
+15
View File
@@ -220,6 +220,21 @@ def warmup_kernels(
We must call the provided worker's execute_model for pipeline parallel
coordination.
"""
# Adaptive costs are calibrated during capture, after this warmup. Exercise
# fixed draft counts here, then restore the manager for capture and serving.
adaptive_verification = model_runner.adaptive_verification
model_runner.adaptive_verification = None
try:
_warmup_kernels(model_runner, worker_execute_model, worker_sample_tokens)
finally:
model_runner.adaptive_verification = adaptive_verification
def _warmup_kernels(
model_runner: GPUModelRunner,
worker_execute_model: Callable[[SchedulerOutput], Any],
worker_sample_tokens: Callable[[GrammarOutput | None], Any],
) -> None:
if model_runner.vllm_config.is_mm_encoder_only:
return