Repository navigation
[Bugfix] Fix TRTLLM ragged MLA prefill workspace warmup - #42112
MatthewBonanni merged 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the _warmup_and_capture logic in gpu_model_runner.py to ensure force_attention is enabled for all captured CUDA graph modes, rather than only for full graphs. This adjustment ensures that attention metadata is built during warmup, preventing forbidden lazy workspace allocations after lock_workspace() is called. I have no feedback to provide as no review comments were submitted.
|
Hi @mmangkad, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
@MatthewBonanni @LucasWilkinson could you help take a look at this? |
MatthewBonanni
left a comment
There was a problem hiding this comment.
Thanks for finding this bug and contributing this fix! I'd prefer to just eagerly allocate the buffers though, rather than force_attention for PIECEWISE warmups.
a7d1245 to
33b1581
Compare
|
@MatthewBonanni updated |
33b1581 to
52b4a3d
Compare
Eagerly allocate FlashInfer workspace buffers during MLA prefill backend initialization so they are reserved before workspace locking. This prevents TRTLLM_RAGGED prefill from first allocating its workspace during inference after lock_workspace(). Signed-off-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com>
52b4a3d to
3967b35
Compare
…#42112) Signed-off-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com>
…#42112) Signed-off-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com>
…#42112) Signed-off-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com> Signed-off-by: Liuweixiong0118 <lwx34158427@gmail.com>
Cherry-pick 62 bugfix/security PRs from upstream vllm-project/vllm main (2026-05-03 to 2026-06-17), covering scheduler, engine core, model runner, worker, attention, KV cache, compilation, and structured output fixes. Security (4): vllm-project#43286 vllm-project#44744 vllm-project#45118 vllm-project#45252 Bugfix (56): vllm-project#35536 vllm-project#36616 vllm-project#38895 vllm-project#39155 vllm-project#39324 vllm-project#39562 vllm-project#39805 vllm-project#40398 vllm-project#40726 Runner fix (2): vllm-project#44568 vllm-project#44603 Skipped: vllm-project#43781 (ROCm-specific, not applicable to Ascend NPU) Conflict resolutions: - Manual merge: vllm-project#43286 vllm-project#45118 vllm-project#42112 vllm-project#43160 vllm-project#43719 vllm-project#44560 - Upstream-preferred (-X theirs): vllm-project#43808 vllm-project#43988 vllm-project#42967 vllm-project#35536 vllm-project#45195 - Test files (--theirs): vllm-project#44744 vllm-project#41895 vllm-project#42040 vllm-project#41233 vllm-project#45345 vllm-project#43982 Co-authored-by: GitHub Copilot Signed-off-by: MingqiWang-coder <mingqiwang@hust.edu.cn>
…#42112) Signed-off-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com>
Purpose
Fix
TRTLLM_RAGGEDMLA prefill failing after CUDA graph capture.After the MLA prefill backend refactor in #32623, the FlashInfer workspace used by
TRTLLM_RAGGEDMLA prefill is allocated lazily. The first real request afterlock_workspace()could hit:Eagerly allocate the FlashInfer workspace buffers during MLA prefill backend initialization so they are reserved before
lock_workspace().cc @MatthewBonanni @LucasWilkinson @mgoin
Test Plan
Run the server with
TRTLLM_RAGGEDMLA prefill on GB300 GPUs:vllm serve moonshotai/Kimi-K2.6 \ --trust-remote-code \ --tensor-parallel-size 4 \ --attention-config.mla_prefill_backend TRTLLM_RAGGED \ --tool-call-parser kimi_k2 \ --enable-auto-tool-choice \ --reasoning-parser kimi_k2 \ --speculative-config '{"model": "lightseekorg/kimi-k2.6-eagle3-mla", "method": "eagle3", "num_speculative_tokens": 3}'Test Result
Before this PR, the command above did not start successfully and failed with the locked workspace assertion.
After this PR, the same command starts successfully and works correctly with
TRTLLM_RAGGEDMLA prefill.