[https://nvbugs/6191524][fix] In MLA.forward_context, also call the warmup when has_cached_kv_for_mla_context - #14536
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change expands the warm-up logic in ChangesMLA Attention Warm-up Coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
85bc8b0 to
329de3a
Compare
|
/bot run |
|
PR_Github #50327 [ run ] triggered by Bot. Commit: |
|
PR_Github #50327 [ run ] completed with state
|
329de3a to
d5666d3
Compare
|
/bot run |
|
PR_Github #50654 [ run ] triggered by Bot. Commit: |
|
PR_Github #50654 [ run ] completed with state
|
d5666d3 to
8b52e64
Compare
|
/bot run |
|
PR_Github #50680 [ run ] triggered by Bot. Commit: |
|
PR_Github #50680 [ run ] completed with state
|
In MLA prefill, forward_context_with_cached_kv calls maybe_compiled_cat on shapes that vary with num_ctx_tokens. The existing warmup (cached_warmup_forward_context_with_chunked_prefill) pre-compiles this op via torch._dynamo.maybe_mark_dynamic, but it was only invoked when runtime_features.chunked_prefill was set. Tests that enable block reuse without chunked prefill (e.g. DeepSeek-R1 throughput_mtp_trtllm) hit forward_context_with_cached_kv with no warmup, causing torch.compile to recompile maybe_compiled_cat for each new num_ctx_tokens shape; one of these compilations stalls inside inductor's compile worker, tripping PyExecutor's hang detector. Invoke the same warmup whenever has_cached_kv_for_mla_context is true, so the cached-kv prefill path also gets a single mark_dynamic-based compile rather than per-shape recompiles. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
Signed-off-by: Zhen Huang <145532724+zhhuang-nv@users.noreply.github.com>
8b52e64 to
843bbed
Compare
|
/bot run |
|
PR_Github #51322 [ run ] triggered by Bot. Commit: |
|
PR_Github #51322 [ run ] completed with state |
Summary
Test plan
Links
Summary by CodeRabbit