Skip to content

[Kernel] Remove unused fake implementation - #55535

Open
jeejeelee wants to merge 1 commit into
mainfrom
remove-unused-fake-op
Open

[Kernel] Remove unused fake implementation#55535
jeejeelee wants to merge 1 commit into
mainfrom
remove-unused-fake-op

Conversation

@jeejeelee

@jeejeelee jeejeelee commented Sep 6, 2026

Copy link
Copy Markdown
Member

Purpose

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>

@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 repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@jeejeelee jeejeelee added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 6, 2026
@jeejeelee

Copy link
Copy Markdown
Member Author

/ci run

@mergify mergify Bot added deepseek Related to DeepSeek models DSv4 nvidia labels Sep 6, 2026
@mergify mergify Bot added intel-gpu Related to Intel GPU cpu Related to CPU backends torch.compile labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87418 for commit b02568e35a2a.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

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: 8ba2cfdc-d8be-4fd8-bd2a-1e8183ec62e7

📥 Commits

Reviewing files that changed from the base of the PR and between f2e2936 and b02568e.

📒 Files selected for processing (39)
  • vllm/_aiter_ops.py
  • vllm/_custom_ops.py
  • vllm/_xpu_ops.py
  • vllm/compilation/passes/fusion/allreduce_rms_fusion.py
  • vllm/kernels/helion/ops/dynamic_per_token_scaled_fp8_quant.py
  • vllm/kernels/helion/ops/fused_qk_norm_rope.py
  • vllm/kernels/helion/ops/per_token_group_fp8_quant.py
  • vllm/kernels/helion/ops/rms_norm_dynamic_per_token_quant.py
  • vllm/kernels/helion/ops/rms_norm_per_block_quant.py
  • vllm/kernels/helion/ops/silu_and_mul_per_block_quant.py
  • vllm/kernels/helion/register.py
  • vllm/lora/ops/triton_ops/fused_moe_lora_fp8_op.py
  • vllm/lora/ops/triton_ops/fused_moe_lora_op.py
  • vllm/lora/ops/triton_ops/lora_expand_fp8_op.py
  • vllm/lora/ops/triton_ops/lora_expand_op.py
  • vllm/lora/ops/triton_ops/lora_shrink_fp8_op.py
  • vllm/lora/ops/triton_ops/lora_shrink_op.py
  • vllm/lora/ops/xpu_ops/lora_ops.py
  • vllm/model_executor/kernels/linear/scaled_mm/deep_gemm.py
  • vllm/model_executor/layers/attention/attention.py
  • vllm/model_executor/layers/attention/mla_attention.py
  • vllm/model_executor/layers/attention/static_sink_attention.py
  • vllm/model_executor/layers/hpc/rope_norm.py
  • vllm/model_executor/layers/mamba/gdn/olmo_gdn_linear_attn.py
  • vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py
  • vllm/model_executor/layers/mamba/linear/minimax_linear_attn.py
  • vllm/model_executor/layers/mamba/mamba_mixer.py
  • vllm/model_executor/layers/mamba/mamba_mixer2.py
  • vllm/model_executor/layers/mamba/ops/cpu/gdn_attention.py
  • vllm/model_executor/layers/mamba/short_conv.py
  • vllm/model_executor/layers/rotary_embedding/common.py
  • vllm/model_executor/models/bailing_moe_v3.py
  • vllm/model_executor/offloader/prefetch_ops.py
  • vllm/models/deepseek_v4/xpu/model.py
  • vllm/models/qwen4_exp/amd/ple_layer.py
  • vllm/models/qwen4_exp/amd/qsa.py
  • vllm/models/qwen4_exp/nvidia/ple_layer.py
  • vllm/models/qwen4_exp/nvidia/qsa.py
  • vllm/utils/flashinfer.py
💤 Files with no reviewable changes (38)
  • vllm/lora/ops/triton_ops/lora_expand_fp8_op.py
  • vllm/model_executor/layers/rotary_embedding/common.py
  • vllm/model_executor/layers/attention/static_sink_attention.py
  • vllm/kernels/helion/ops/fused_qk_norm_rope.py
  • vllm/model_executor/kernels/linear/scaled_mm/deep_gemm.py
  • vllm/model_executor/layers/mamba/mamba_mixer2.py
  • vllm/models/qwen4_exp/nvidia/ple_layer.py
  • vllm/kernels/helion/ops/dynamic_per_token_scaled_fp8_quant.py
  • vllm/kernels/helion/ops/rms_norm_per_block_quant.py
  • vllm/model_executor/layers/mamba/short_conv.py
  • vllm/model_executor/offloader/prefetch_ops.py
  • vllm/models/qwen4_exp/amd/qsa.py
  • vllm/models/qwen4_exp/nvidia/qsa.py
  • vllm/model_executor/layers/mamba/mamba_mixer.py
  • vllm/lora/ops/triton_ops/lora_shrink_fp8_op.py
  • vllm/lora/ops/triton_ops/lora_shrink_op.py
  • vllm/models/qwen4_exp/amd/ple_layer.py
  • vllm/model_executor/models/bailing_moe_v3.py
  • vllm/model_executor/layers/mamba/linear/minimax_linear_attn.py
  • vllm/model_executor/layers/mamba/gdn/olmo_gdn_linear_attn.py
  • vllm/kernels/helion/ops/silu_and_mul_per_block_quant.py
  • vllm/lora/ops/triton_ops/fused_moe_lora_fp8_op.py
  • vllm/model_executor/layers/hpc/rope_norm.py
  • vllm/models/deepseek_v4/xpu/model.py
  • vllm/lora/ops/triton_ops/fused_moe_lora_op.py
  • vllm/utils/flashinfer.py
  • vllm/lora/ops/triton_ops/lora_expand_op.py
  • vllm/lora/ops/xpu_ops/lora_ops.py
  • vllm/model_executor/layers/attention/mla_attention.py
  • vllm/model_executor/layers/mamba/ops/cpu/gdn_attention.py
  • vllm/_aiter_ops.py
  • vllm/kernels/helion/ops/per_token_group_fp8_quant.py
  • vllm/_custom_ops.py
  • vllm/compilation/passes/fusion/allreduce_rms_fusion.py
  • vllm/model_executor/layers/attention/attention.py
  • vllm/kernels/helion/ops/rms_norm_dynamic_per_token_quant.py
  • vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py
  • vllm/_xpu_ops.py

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


📝 Summary

Summary by CodeRabbit

  • Refactor

    • Streamlined custom operator registration across attention, quantization, routing, recurrent, LoRA, and device-specific operations.
    • Removed redundant compile-time fallback implementations while preserving runtime kernel behavior and mutation handling.
    • Improved kernel registration flexibility for operations that mutate outputs without returning values.
    • Updated generated-input handling for per-block quantization scenarios.
  • Compatibility

    • Existing operator interfaces and runtime implementations remain unchanged; no end-user functionality was removed.

Walkthrough

The change removes redundant fake implementations from custom operators and Helion kernels. Registrations retain runtime implementations and mutation metadata. Helion registration now detects void-returning mutating kernels and permits missing fake implementations.

Changes

Fake implementation cleanup

Layer / File(s) Summary
Backend operator registrations
vllm/_aiter_ops.py, vllm/_custom_ops.py, vllm/_xpu_ops.py, vllm/compilation/passes/fusion/allreduce_rms_fusion.py
Selected AITER, Torch, XPU, and fusion operators no longer register fake implementations.
Helion registration handling
vllm/kernels/helion/register.py, vllm/kernels/helion/ops/*
Helion removes redundant fake implementations. Registration skips inferred fakes for void-returning kernels that mutate arguments.
LoRA operator registrations
vllm/lora/ops/triton_ops/*, vllm/lora/ops/xpu_ops/lora_ops.py
LoRA custom operators retain their runtime functions and mutation metadata without fake implementations.
Model operator registrations
vllm/model_executor/*, vllm/models/*, vllm/utils/flashinfer.py
Attention, Mamba, rotary, offloader, model, and FlashInfer operators no longer register removed fake implementations.

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

Merge Risk: ⚪ Minimal · up to b0256

This change removes redundant fake custom-operator implementations while retaining runtime implementations and mutation metadata. No concrete current-head merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is an unfilled template. It does not provide a specific purpose, test plan, or test results. Replace the template with a concise purpose, the exact tests or commands executed, and the resulting test status or output.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removal of unused fake implementations from kernel-related code.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@github-project-automation github-project-automation Bot moved this to Ready in NVIDIA Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpu Related to CPU backends deepseek Related to DeepSeek models DSv4 intel-gpu Related to Intel GPU nvidia ready ONLY add when PR is ready to merge/full CI is needed torch.compile

Projects

Status: Ready
Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants