Skip to content

Add a8w4 kernel for Quark mix-precision#837

Open
amd-xiaoyu12 wants to merge 1 commit into
ROCm:mainfrom
amd-xiaoyu12:xiaoyu/a8w4-quark
Open

Add a8w4 kernel for Quark mix-precision#837
amd-xiaoyu12 wants to merge 1 commit into
ROCm:mainfrom
amd-xiaoyu12:xiaoyu/a8w4-quark

Conversation

@amd-xiaoyu12

Copy link
Copy Markdown

Motivation

Add a modified A8W4 preshuffle GEMM kernel (from v0.1.7) at kernels/gemm/preshuffle_gemm_a8w4.py.
Port the A8W4 kernel to the current FlyDSL kernels/gemm/ layout and kernels.mma.* imports.
Include the ragged-M OOB fix by sizing A/C buffer descriptors with exact runtime num_records_bytes, preventing out-of-bounds reads/writes for non-tile-aligned M.

Quark integration: https://gitenterprise.xilinx.com/AMDNeuralOpt/Quark/pull/5866

Test Plan

Finished end to end test on Quark diffusion model Wan2.2 mix precision - w4a4/w4a8.

Compile verification:
python -m py_compile kernels/gemm/preshuffle_gemm_a8w4.py.
GPU correctness/perf tests not run locally. Recommended follow-up: run the A8W4 ragged-M validation on gfx950 with the Quark integration test once the Quark patch is applied.

Test Result

Submission Checklist

@amd-xiaoyu12
amd-xiaoyu12 requested a review from coderfeli July 12, 2026 16:50
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.

1 participant