[Core] Warm up runner-owned Triton kernels before the first request (#49903)

This commit is contained in:
Nick Hill
2026-07-28 07:58:02 -07:00
committed by GitHub
parent 1e81853afc
commit 0d0504b54c
7 changed files with 183 additions and 189 deletions
+10 -6
View File
@@ -98,12 +98,16 @@ def kernel_warmup(worker: "Worker", *, process_local_only: bool = False):
minimax_m3_msa_warmup,
)
# Pooling models do not use the generation slot-mapping path.
if not worker.use_v2_model_runner and not worker.model_runner.is_pooling_model:
warm_v1_block_table_kernels(
getattr(worker.model_runner, "device", torch.device("cuda")),
worker.scheduler_config.max_num_batched_tokens,
)
if not worker.use_v2_model_runner:
# Pooling models do not use the generation slot-mapping path.
if not worker.model_runner.is_pooling_model:
warm_v1_block_table_kernels(worker.model_runner)
# The KV-block zeroing kernel is driven by the scheduler's
# `new_block_ids_to_zero`, so no dummy run ever reaches it.
zeroer = getattr(worker.model_runner, "_kv_block_zeroer", None)
if zeroer is not None:
zeroer.warmup(worker.model_runner.kv_cache_config.num_blocks)
qwen_triton_warmup(worker.model_runner, worker.vllm_config.model_config)
# DSv4 mHC TileLang kernels (hc_pre/hc_post/hc_head_op) run every decoder