Skip to content

[4/N][warmup][DSv4] Migrate common attention kernels - #50176

Merged
LucasWilkinson merged 4 commits into
vllm-project:mainfrom
LopezCastroRoberto:warmup_migration/dsv4_3
Sep 8, 2026
Merged

LucasWilkinson merged 4 commits into
vllm-project:mainfrom
LopezCastroRoberto:warmup_migration/dsv4_3

Conversation

@LopezCastroRoberto

@LopezCastroRoberto LopezCastroRoberto commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Depends on: #50175

For more details, see parent PR: #49627 and tracking issue #49349

Description

This PR migrates DSv4 common attention preparation, cache, indexer, and sparse-attention kernels to the shared warmup contract.

What Changed

  • Migrated fused Q/K normalization and MTP input normalization.
  • Migrated cache compression, inverse-RoPE quantization, and partial-state kernels.
  • Migrated common Triton indexer and sparse-attention kernels.
  • Defined kernel-owned compile keys and AST-traced warmup spaces.
  • Added compile-only paths without dummy kernel launches.
  • Added tests comparing dispatch results with pre-migration specialization logic.

@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.

@LopezCastroRoberto LopezCastroRoberto changed the title [1/N][warmup][DSv4] Migrate attention kernels [2/N][warmup][DSv4] Migrate attention kernels Jul 28, 2026
@mergify mergify Bot added deepseek Related to DeepSeek models v1 labels Jul 28, 2026
@mergify

mergify Bot commented Jul 29, 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 Jul 29, 2026
@LopezCastroRoberto
LopezCastroRoberto marked this pull request as draft July 29, 2026 17:11
@mergify mergify Bot added kimi k3 and removed needs-rebase labels Aug 24, 2026
@LopezCastroRoberto LopezCastroRoberto changed the title [2/N][warmup][DSv4] Migrate attention kernels [4/N][warmup][DSv4] Migrate common attention kernels Aug 24, 2026
@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mergify mergify Bot removed the needs-rebase label Sep 4, 2026
Comment thread vllm/models/deepseek_v4/common/ops/fused_mtp_input_rmsnorm.py Outdated
Comment thread vllm/models/deepseek_v4/common/ops/fused_mtp_input_rmsnorm.py Outdated
Comment thread vllm/models/common/ops/fused_qk_rmsnorm.py Outdated
Comment thread vllm/models/deepseek_v4/common/ops/fused_indexer_q.py
Comment thread vllm/models/deepseek_v4/common/ops/fused_compress_quant_cache.py Outdated
Comment thread vllm/models/deepseek_v4/common/ops/cache_utils.py Outdated
Comment thread vllm/models/deepseek_v4/common/ops/cache_utils.py Outdated
Comment thread vllm/models/deepseek_v4/common/ops/cache_utils.py Outdated
Comment thread vllm/models/deepseek_v4/common/ops/cache_utils.py
Comment thread vllm/models/deepseek_v4/common/ops/save_partial_states.py Outdated
@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

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

@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.

Overall LGTM, left a comment would be nice to address before landing

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.

I think we should not do warmup unit tests (especially specific ones like this) and instead just setting jit_monitor_mode to error for models we've scrubbed

@LucasWilkinson

Copy link
Copy Markdown
Contributor

/ci run

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87579 for commit 70b0b4218e72.

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

github-actions Bot commented Sep 7, 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.

Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
@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 #87586 for commit 109045dae96d.

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ The previous CI build is still running: https://buildkite.com/vllm/ci/builds/87586

@LopezCastroRoberto

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87688 for commit 4c7c4fd5ed47.

@LucasWilkinson
LucasWilkinson merged commit 6ddbab0 into vllm-project:main Sep 8, 2026
91 checks passed
ywang96 added a commit that referenced this pull request Sep 10, 2026
Split out from #56214: include only the changes under vllm/models/.

Adds the new vllm/models/deepseek_v4_1/ model definition package
(nvidia, amd, and common code paths) and the associated
vllm/models/deepseek_v4/ modifications.

Rebased onto main: fused_inv_rope_fp8_quant.py was ported onto the
VllmTritonJitKernel class structure from #50176, keeping the PDL warmup
fix from #56035, while preserving this change's QUANTIZE toggle,
NOPE_DIM-based rope offset, and vectorized UE8M0 scale packing.

Co-authored-by: Kimi Code <noreply@moonshot.cn>
Signed-off-by: Roger Wang <hey@rogerw.io>
ItsRoy69 pushed a commit to ItsRoy69/vllm that referenced this pull request Sep 10, 2026
)

Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Jyotirmoy Roy <jyotirmoyroy649@gmail.com>
@zyongye

zyongye commented Sep 14, 2026

Copy link
Copy Markdown
Member

@LopezCastroRoberto I just notice this change. One nit suggestion I have is that for triton kernel can we use the original kernel name instead of kernel? Otherwise on profiling trace is will only show kernel which shows no information. Cutedsl kernel is ok.
Screenshot 2026-09-14 at 12 21 35 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek Related to DeepSeek models DSv4 inkling k3 kimi ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants