Skip to content

[3/N][warmup][DSv4] Migrate FA4 MLA and shared CuTeDSL kernels - #53565

Merged
LucasWilkinson merged 10 commits into
vllm-project:mainfrom
LopezCastroRoberto:warmup_migration/dsv4_7
Sep 7, 2026
Merged

LucasWilkinson merged 10 commits into
vllm-project:mainfrom
LopezCastroRoberto:warmup_migration/dsv4_7

Conversation

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor

Depends on: #50175

For more details, see parent (draft) PR: #49627 and tracking list issue #49349

Description

This PR migrates the FA4 MLA prefill and Inkling FA4 relative-attention paths to the shared JIT warmup contract.

What Changed

  • Migrated FA4 MLA prefill specialization and compile-only warmup.
  • Migrated Inkling FA4 relative-attention warmup.
  • Removed the corresponding legacy external FA4 warmup orchestration.
  • Kept compile-key generation and warmup search spaces next to their runtime kernels.
  • Preserved the existing FA4 compile-only adapters and specialization behavior.
  • Added tests comparing migrated warmup keys with the pre-migration logic.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify

mergify Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @LopezCastroRoberto.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Sep 1, 2026
…armup_migration/dsv4_7

Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>

# Conflicts:
#	vllm/model_executor/layers/attention/mla_attention.py
#	vllm/model_executor/warmup/kernel_warmup.py

@LucasWilkinson LucasWilkinson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks!

@LucasWilkinson LucasWilkinson added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

✅ @LopezCastroRoberto, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: d9497c44-7465-4e1e-8704-efec1a843182

📥 Commits

Reviewing files that changed from the base of the PR and between 9cc7793 and 9ccd8bf.

📒 Files selected for processing (8)
  • tests/models/inkling/test_fa4_rel_attention.py
  • tests/v1/attention/test_mla_prefill_quant_output.py
  • vllm/model_executor/warmup/fa4_cutedsl_warmup.py
  • vllm/model_executor/warmup/kernel_warmup.py
  • vllm/models/inkling/nvidia/attention.py
  • vllm/models/inkling/nvidia/ops/__init__.py
  • vllm/models/inkling/nvidia/ops/fa4_rel_attention.py
  • vllm/v1/attention/backends/mla/prefill/flash_attn.py
💤 Files with no reviewable changes (2)
  • vllm/model_executor/warmup/kernel_warmup.py
  • vllm/model_executor/warmup/fa4_cutedsl_warmup.py
🚧 Files skipped from review as they are similar to previous changes (6)
  • vllm/models/inkling/nvidia/ops/fa4_rel_attention.py
  • tests/models/inkling/test_fa4_rel_attention.py
  • vllm/models/inkling/nvidia/ops/init.py
  • tests/v1/attention/test_mla_prefill_quant_output.py
  • vllm/v1/attention/backends/mla/prefill/flash_attn.py
  • vllm/models/inkling/nvidia/attention.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Performance

    • FA4 MLA prefill and Inkling relative-attention kernels now register JIT warmup directly when enabled, helping reduce initial execution overhead.
  • Refactor

    • Consolidated FA4 kernel warmup behavior within the relevant attention components.
    • Removed the standalone FA4 warmup pathway without changing supported attention functionality.
  • Tests

    • Added coverage verifying that warmup registration occurs only for FA4 when JIT warmup is enabled.
    • Updated relative-attention test references to match the current kernel naming.

Walkthrough

The change makes FA4 kernel singletons private, registers Inkling and MLA JIT warmup during attention construction, removes the standalone FA4 warmup module, and updates related tests.

Changes

FA4 kernel updates

Layer / File(s) Summary
Private kernel exports and references
vllm/models/inkling/nvidia/ops/__init__.py, vllm/models/inkling/nvidia/ops/fa4_rel_attention.py, vllm/models/inkling/nvidia/attention.py, vllm/v1/attention/backends/mla/prefill/flash_attn.py, tests/models/inkling/test_fa4_rel_attention.py
The Inkling and MLA FA4 kernel singletons use private names. Imports, calls, exports, and test references use the renamed identifiers.
Inkling warmup integration
vllm/models/inkling/nvidia/attention.py, vllm/model_executor/warmup/fa4_cutedsl_warmup.py
Inkling attention registers the private FA4 relative-attention kernel for JIT warmup when enabled. The standalone FA4 warmup module is removed.
FA4 MLA prefill warmup integration
vllm/v1/attention/backends/mla/prefill/flash_attn.py, tests/v1/attention/test_mla_prefill_quant_output.py
The backend registers MLA prefill warmup only when JIT warmup is enabled and FlashAttention version 4 is active. A parametrized test validates these conditions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 33e62

This change moves FA4 warmup registration into the attention paths and removes legacy orchestration. No concrete merge-blocking risk remains in the supplied evidence.

Sequence Diagram(s)

sequenceDiagram
  participant InklingAttention
  participant KernelConfig
  participant InklingKernel
  InklingAttention->>KernelConfig: read enable_jit_warmup
  KernelConfig-->>InklingAttention: enabled flag
  InklingAttention->>InklingKernel: register_warmup()
Loading
sequenceDiagram
  participant FlashAttnPrefillBackend
  participant KernelConfig
  participant FA4MLAPrefillKernel
  FlashAttnPrefillBackend->>KernelConfig: read enable_jit_warmup
  KernelConfig-->>FlashAttnPrefillBackend: enabled flag
  FlashAttnPrefillBackend->>FA4MLAPrefillKernel: register_warmup() when version is 4
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: migrating FA4 MLA and shared CuTeDSL kernel warmup paths.
Description check ✅ Passed The description directly explains the FA4 MLA and Inkling warmup migration, removal of legacy orchestration, and related tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify mergify Bot removed the needs-rebase label Sep 4, 2026
@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87242 for commit 30c7286384a3.

LopezCastroRoberto and others added 2 commits September 4, 2026 11:58
Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci cancel

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87246 for commit 3581dc1710de.

@LucasWilkinson

Copy link
Copy Markdown
Contributor

/ci retry

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

✅ Queued 7 failed job(s) for retry in Buildkite CI #87246.

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

✅ Queued 2 failed job(s) for retry in Buildkite CI #87246.

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87296 for commit ae8142eaf56f.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87515 for commit 33e6239d3aeb.

@LucasWilkinson
LucasWilkinson enabled auto-merge (squash) September 7, 2026 13:36
@LucasWilkinson
LucasWilkinson merged commit 42801b3 into vllm-project:main Sep 7, 2026
132 checks passed
ItsRoy69 pushed a commit to ItsRoy69/vllm that referenced this pull request Sep 10, 2026
…project#53565)

Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: Jyotirmoy Roy <jyotirmoyroy649@gmail.com>
libinta added a commit to libinta/vllm that referenced this pull request Sep 17, 2026
Resolve conflict in kernel_warmup.py: main (vllm-project#53565) migrated the FA4
CuTeDSL warmup into the JIT warmup registry, so the fa4_cutedsl_warmup
call site this PR gated on has_cutedsl() no longer exists. FA4 warmup is
now registered only by the FA4 MLA prefill backend, which XPU never
selects, so the XPU-safety intent is preserved. Dropped the obsolete
call and its now-unused has_cutedsl import; kept main's
watermark_sample_warmup. The is_xpu() gate on the sparse-MLA warmups is
unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
…project#53565)

Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DSv4 inkling ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants