Chefang/pa decode opus - #4794
Open
fangche123 wants to merge 2 commits into
Open
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an OPUS-based paged-attention decode implementation targeting gfx950, wires it into the Python API via JIT/pybind, and introduces correctness/perf coverage for the new path.
Changes:
- Add gfx950 OPUS paged-attention decode kernel (HIP/C++) plus pybind/JIT module plumbing.
- Expose
aiter.pa_decode_opus(...)Python wrapper and integrate it into existing paged-attention perf testing. - Add a standalone numerical test and a perf comparison benchmark vs the existing ASM decode path; pin
vcs_versioninginsetup.pyto avoid stale transitive deps.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Pin vcs_versioning>=2.0.0 in setup_requires to avoid setuptools_scm import failures with stale 1.x installs. |
| op_tests/test_pa.py | Add perf-test hook for pa_decode_opus and improve ASM timing reporting for bf16. |
| op_tests/test_pa_decode_opus.py | New pytest numerical correctness test comparing against a torch reference. |
| op_tests/bench_pa_decode_opus_vs_asm.py | New benchmark script comparing OPUS decode vs ASM decode (with optional correctness verification). |
| csrc/pybind/pa_decode_opus_pybind.cu | New pybind module definition for the OPUS decode entrypoint. |
| csrc/py_itfs_cu/pa_decode_opus_kernels.cu | Host-side launcher/validation + per-stream split-KV scratch allocation/management. |
| csrc/include/rocm_ops.hpp | Add PA_DECODE_OPUS_PYBIND macro wiring for pybind. |
| csrc/include/pa_decode_opus.h | New single-header kernel implementation and public C++ API declaration. |
| aiter/ops/pa_decode_opus.py | New Python API wrapper around the JIT-compiled module. |
| aiter/jit/optCompilerConfig.json | Register module_pa_decode_opus sources and HIP compile flags. |
| aiter/init.py | Export pa_decode_opus from the package top-level import surface. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fangche123
force-pushed
the
chefang/pa-decode-opus
branch
from
August 17, 2026 07:36
4467d91 to
830d14e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist