Skip to content

feat(pa): add persistent FP8 decode path - #454

Merged
coderfeli merged 40 commits into
mainfrom
flydsl_upstream
May 4, 2026
Merged

feat(pa): add persistent FP8 decode path#454
coderfeli merged 40 commits into
mainfrom
flydsl_upstream

Conversation

@fsx950223

Copy link
Copy Markdown
Contributor

Summary

  • Add a persistent-scheduling FP8 paged-attention decode path with 1024-token KV pages, 256-token compute tiles, block-split partial output, and split-reduce support.
  • Extend PA decode launch/test coverage for per-token/per-tensor scaling, CUDA graph capture paths, sliding-window/global-window behavior, and Gluon comparisons when available.
  • Add supporting FlyDSL buffer descriptor base offsets, debug-info-aware JIT cache keys, and ROCDL scheduler mask plumbing needed by the new kernels.

Test plan

  • Not run during PR creation.
  • IDE lint check currently reports optional dependency resolution warnings for aiter and triton in the PA test/kernel files when those packages are not installed in the editor environment.

Made with Cursor

sixifang added 26 commits April 2, 2026 08:13
Add the persistent-scheduling FP8 paged-attention kernel and a PS-focused regression harness so split-reduce behavior can be exercised against the Gluon reference.

Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Copilot AI review requested due to automatic review settings April 29, 2026 05:28
Comment thread kernels/pa_decode_fp8.py Outdated
Comment thread kernels/pa_decode_fp8.py Outdated
Comment thread kernels/pa_decode_fp8.py
Comment thread kernels/pa_decode_fp8.py Outdated
Comment thread kernels/pa_decode_fp8.py Outdated
Comment thread kernels/pa_decode_fp8.py Outdated
Comment thread kernels/pa_decode_fp8.py Outdated
Comment thread kernels/pa_decode_fp8.py

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

Adds a persistent-scheduling (PS) FP8 paged-attention decode implementation (1024-token KV pages / 256-token tiles) and extends the supporting Python/FlyDSL plumbing needed to launch and validate it.

Changes:

  • Introduces a new PS-mode PA decode kernel path (plus sliding-window path + reduce integration) in kernels/pa_decode_fp8.py.
  • Extends FlyDSL buffer resource descriptor creation to support base-pointer byte offsets for descriptor “windowing”.
  • Updates JIT cache keying to include debug-info emission mode, and adds a ROCDL scheduler mask constant used by the new kernels.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/kernels/test_pa.py Replaced prior PA test with a PS-only regression harness and expanded accuracy/perf checks vs Torch/Gluon.
python/flydsl/expr/rocdl/init.py Adds mask_compute scheduler mask constant.
python/flydsl/expr/buffer_ops.py Adds base_byte_offset support when building buffer resource descriptors.
python/flydsl/compiler/jit_function.py Makes FlyDSL toolchain fingerprint depend on debug-info mode to avoid cache collisions.
kernels/pa_decode_fp8.py Implements persistent-scheduling FP8 PA decode, metadata expansion for block-split partials, and sliding-window support.

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

Comment thread tests/kernels/test_pa.py
Comment thread kernels/pa_decode_fp8.py
Comment thread tests/kernels/test_pa.py
Comment thread tests/kernels/test_pa.py Outdated
Comment thread tests/kernels/test_pa.py
Comment thread tests/kernels/test_pa.py
Comment thread tests/kernels/test_pa.py
sixifang added 6 commits April 29, 2026 05:43
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Comment thread kernels/pa_decode_fp8.py
Comment thread kernels/pa_decode_fp8.py
sixifang added 4 commits April 30, 2026 04:00
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
@fsx950223

Copy link
Copy Markdown
Contributor Author

Please merge the PR, it's a functional implementation, syntax update could be done in the next PR.

coderfeli and others added 4 commits May 3, 2026 13:41
Move PA descriptor windowing into the kernel helper so the compiler buffer API stays unchanged while preserving the generated ISA.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep PA descriptor windowing on the buffer resource helper and fold the LDS buffer-load convenience wrapper into raw_ptr_buffer_load_lds defaults.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the unused LDS load convenience wrapper without adding defaults to the raw ROCDL wrapper.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderfeli
coderfeli merged commit 35be33a into main May 4, 2026
11 checks passed
@coderfeli
coderfeli deleted the flydsl_upstream branch May 4, 2026 14:34
omuhamma pushed a commit that referenced this pull request May 8, 2026
* feat(pa): add persistent-scheduling FP8 decode path

Add the persistent-scheduling FP8 paged-attention kernel and a PS-focused regression harness so split-reduce behavior can be exercised against the Gluon reference.

Signed-off-by: sixifang <sixifang@amd.com>
Made-with: Cursor
---------

Signed-off-by: sixifang <sixifang@amd.com>
Co-authored-by: sixifang <sixifang@amd.com>
Co-authored-by: felix <felix.li@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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