Skip to content

add rope/rotate_activation/fp4_quant_inplace fused kernel for dsv4 - #3035

Merged
valarLip merged 3 commits into
mainfrom
jun/rotate_fp4quant
May 6, 2026
Merged

valarLip merged 3 commits into
mainfrom
jun/rotate_fp4quant

Conversation

@junhaha666

Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@junhaha666
junhaha666 requested review from a team and Copilot May 5, 2026 14:26
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 3035 --add-label <label>

Copilot AI 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.

Pull request overview

This PR adds a new DSV4 HIP/JIT module that fuses Hadamard rotation, optional RoPE, and FP4 quantize/dequantize paths into new aiter.ops.quant entry points.

Changes:

  • Adds new C++/HIP kernels and pybind bindings for rotate-only, rotate+FP4, RoPE+rotate, and RoPE+rotate+FP4 paths.
  • Extends OPUS helper utilities and JIT config so the new module can quantize/dequantize FP4 data and be built on demand.
  • Adds a new op_tests script with torch reference implementations and benchmark coverage for the quantized paths.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
op_tests/test_rotate_fp4quant.py Adds a benchmark/reference script for the new fused rotate+FP4 kernels.
csrc/pybind/dsv4_rotate_quant_pybind.cu Registers the new DSV4 rotate/quant APIs with pybind.
csrc/kernels/dsv4_rotate_quant.cu Implements the new HIP kernels for rotate, RoPE+rotate, and FP4 quantized variants.
csrc/include/rocm_ops.hpp Adds the pybind macro exposing the new module functions.
csrc/include/dsv4_rotate_quant.h Declares the new kernel entry points.
csrc/include/aiter_opus_plus.h Adds FP4 dequant/scaled-cast helper overloads used by the new kernels.
aiter/ops/quant.py Exposes Python compile_ops wrappers and docstrings for the new APIs.
aiter/jit/optCompilerConfig.json Registers module_dsv4_rotate_quant for JIT compilation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread op_tests/test_rotate_fp4quant.py Resolved
Comment thread aiter/ops/quant.py Resolved
Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread csrc/kernels/dsv4_rotate_quant.cu Resolved
Comment thread aiter/ops/quant.py Resolved
@valarLip
valarLip merged commit 0141c8c into main May 6, 2026
56 of 62 checks passed
@valarLip
valarLip deleted the jun/rotate_fp4quant branch May 6, 2026 10:29
Liang-jianhao97 pushed a commit that referenced this pull request May 7, 2026
…3035)

* add rotate_fp4quant_inplace

* add rope_rotate_activation_fp4quant_inplace

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants