Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e87194b
[OPUS] Replace the MXFP4 MQA-logits API with one mqa_logits_mxfp4 int…
shay-li77 Oct 26, 2026
45809da
[OPUS] Add the R1W1S2L instance for V4.1 MTP-1 decode in mqa_logits_m…
shay-li77 Oct 26, 2026
2a29b4f
[OPUS] Add the Free and Prefill schedule-free modes to the H64 mqa_lo…
shay-li77 Oct 26, 2026
bab2ad9
[OPUS] Speed up the mqa_logits_mxfp4 schedule builder by recording ea…
shay-li77 Oct 26, 2026
6a2c136
[OPUS] Read the whole Table record before the branch in mqa_logits_mx…
shay-li77 Oct 26, 2026
b5a66c8
[OPUS] Pick the V4.1 decode instance in mqa_logits_mxfp4 by rows per …
shay-li77 Oct 26, 2026
8a78a25
[OPUS] Pick the V4 decode instance in mqa_logits_mxfp4 by rows per se…
shay-li77 Oct 26, 2026
9ef6d0e
[OPUS] Make the mqa_logits_mxfp4 selection rule and layout checks per…
shay-li77 Oct 26, 2026
ddf3da1
[OPUS] Register the gfx950 kv64, kv256 and qshare kernels under mqa_l…
shay-li77 Oct 27, 2026
b8863a9
[OPUS] Restore the pa_ prefix on the MXFP4 MQA-logits module, source …
shay-li77 Oct 27, 2026
3faac9e
[OPUS] Clean up the MXFP4 MQA-logits sources for merge: drop the kv25…
shay-li77 Oct 27, 2026
d7bbac8
[OPUS] Reject a dense out narrower than max_seq_len, share one tpb_sh…
shay-li77 Oct 27, 2026
886099a
[OPUS] Compute the Prefill split point in exact 32-bit arithmetic so …
shay-li77 Oct 29, 2026
ad5c5b5
Merge remote-tracking branch 'origin/main' into lxx/dev/mqa_logits_mx…
shay-li77 Oct 29, 2026
ccb2e6c
[OPUS] Clamp gathered candidate page ids into the KV pool, reject a m…
shay-li77 Oct 29, 2026
079b38b
[OPUS] Clamp gathered candidate page ids against the KV plane's exact…
shay-li77 Oct 29, 2026
4042b22
[OPUS] Take out_offsets as int32, as ATOM's packed logits and FlyDSL …
shay-li77 Oct 29, 2026
06272ed
[OPUS] Launch mqa_logits_mxfp4 from addresses and scalars checked in …
shay-li77 Oct 30, 2026
2ca0a10
[OPUS] Declare the mqa_logits_mxfp4 address launch as a compile_ops s…
shay-li77 Oct 30, 2026
edc5bce
[OPUS] Bound the mqa_logits_mxfp4 config cache at 1024 entries and ma…
shay-li77 Nov 2, 2026
791fc88
[OPUS] Run V4.1's full layers on gfx950 in the 64-row layout with a 3…
shay-li77 Nov 2, 2026
04235d5
Merge remote-tracking branch 'origin/main' into lxx/dev/mqa_logits_mx…
shay-li77 Nov 3, 2026
aff73da
[OPUS] Run mqa_logits_mxfp4's gfx1250 kernels on gfx1250-strict, mapp…
shay-li77 Nov 3, 2026
5cd34e2
Merge branch 'main' into lxx/dev/mqa_logits_mxfp4_v2
shay-li77 Nov 3, 2026
bde80df
[OPUS] mqa_logits_mxfp4 gfx950: Free counts every group of the sequen…
shay-li77 Nov 3, 2026
0bff524
[OPUS] mqa_logits_mxfp4 gfx950: read kv_cache pools past 4 GiB, a buf…
shay-li77 Nov 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions aiter/jit/optCompilerConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -1597,15 +1597,25 @@
},
"module_pa_mqa_logits_mxfp4_opus": {
"srcs": [
"f'{AITER_CSRC_DIR}/kernels/opus_mqa_logits/pa_mqa_logits_mxfp4/pa_mqa_logits_mxfp4_kernels.cu'",
"f'{AITER_CSRC_DIR}/kernels/opus_mqa_logits/pa_mqa_logits_mxfp4/pa_mqa_logits_mxfp4.cu'",
"f'{AITER_CSRC_DIR}/kernels/opus_mqa_logits/pa_mqa_logits_mxfp4/pa_mqa_logits_mxfp4_gfx950.cu'",
"f'{AITER_CSRC_DIR}/kernels/opus_mqa_logits/pa_mqa_logits_mxfp4/pa_mqa_logits_mxfp4_gfx1250.cu'",
"f'{AITER_CSRC_DIR}/kernels/opus_mqa_logits/pa_mqa_logits_mxfp4/pa_mqa_logits_mxfp4_pybind.cu'"
],
"flags_extra_cc": [],
"flags_extra_hip": [
"'-ffast-math'",
"'-fno-finite-math-only'",
"('-mllvm -enable-post-misched=1' if (get_gfx() == 'gfx950' or 'gfx950' in os.environ.get('GPU_ARCHS', '')) else '')"
"'-fno-finite-math-only'"
],
"flags_extra_hip_per_source": {
"*pa_mqa_logits_mxfp4_gfx950.cu": [
"-mllvm -enable-post-misched=1"
],
"*pa_mqa_logits_mxfp4_gfx1250.cu": [
"-fno-honor-nans",
"-mllvm -enable-post-misched=1"
]
},
"extra_ldflags": "None",
"extra_include": [],
"verbose": "False",
Expand Down
1,543 changes: 913 additions & 630 deletions aiter/ops/opus/pa_mqa_logits_mxfp4.py

Large diffs are not rendered by default.

61 changes: 31 additions & 30 deletions csrc/include/rocm_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1540,46 +1540,47 @@ namespace py = pybind11;
py::arg("num_experts"), \
py::arg("num_local_tokens") = std::nullopt);

#define PA_MQA_LOGITS_MXFP4_PYBIND \
m.def("pa_mqa_logits_mxfp4_build_tiles", \
&pa_mqa_logits_mxfp4_build_tiles, \
py::arg("cu_seq_q"), \
py::arg("cu_tiles"), \
py::arg("total_q"), \
py::arg("max_tiles"), \
py::arg("q_per_block")); \
m.def("pa_mqa_logits_mxfp4_build_sched", \
&pa_mqa_logits_mxfp4_build_sched, \
py::arg("cu_tiles"), \
py::arg("local_starts"), \
py::arg("local_ends"), \
py::arg("row_to_batch"), \
#define MQA_LOGITS_MXFP4_PYBIND \
m.def("mqa_logits_mxfp4_instances", \
&mqa_logits_mxfp4_instances, \
py::arg("device_id"), \
py::arg("out")); \
m.def("mqa_logits_mxfp4_build_schedule", \
&mqa_logits_mxfp4_build_schedule, \
py::arg("query_start_loc"), \
py::arg("row_ends"), \
py::arg("cu_groups"), \
py::arg("cta_info"), \
py::arg("num_tiles"), \
py::arg("num_rows"), \
py::arg("instance"), \
py::arg("num_ctas"), \
py::arg("cta_resident"), \
py::arg("block_k"), \
py::arg("q_per_block")); \
m.def("pa_mqa_logits_mxfp4_fwd_sched", \
&pa_mqa_logits_mxfp4_fwd_sched, \
py::arg("cta_resident")); \
m.def("mqa_logits_mxfp4_launch", \
&mqa_logits_mxfp4_launch, \
py::arg("q"), \
py::arg("q_scale"), \
py::arg("kv_cache"), \
py::arg("kv_scale"), \
py::arg("block_tables"), \
py::arg("weights"), \
py::arg("local_starts"), \
py::arg("local_ends"), \
py::arg("block_tables"), \
py::arg("query_start_loc"), \
py::arg("row_ends"), \
py::arg("cta_info"), \
py::arg("out"), \
py::arg("num_rows"), \
py::arg("num_ctas"), \
py::arg("out_offsets"), \
py::arg("kv_bytes"), \
py::arg("rows"), \
py::arg("num_seqs"), \
py::arg("bt_stride"), \
py::arg("out_stride"), \
py::arg("instance"), \
py::arg("schedule_mode"), \
py::arg("weight_scale"), \
py::arg("kv_block_size"), \
py::arg("max_seq_len"), \
py::arg("q_per_block"), \
py::arg("block_k"));
py::arg("tpb_shift"), \
py::arg("cta_target"), \
py::arg("prefill_parts"), \
py::arg("grid"), \
py::arg("device"), \
py::arg("stream"));

#define FMHA_FWD_BF16_OPUS_PYBIND \
m.def("fmha_fwd_bf16_opus_fwd", \
Expand Down
Loading
Loading