Skip to content

[CK] [JIT] [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU - #8294

Closed
gyohuangxin wants to merge 6 commits into
mainfrom
xihuang/revert-e3931369-manual
Closed

gyohuangxin wants to merge 6 commits into
mainfrom
xihuang/revert-e3931369-manual

Conversation

@gyohuangxin

@gyohuangxin gyohuangxin commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • manually revert e3931369cea0d71e968ffea3d3d4002a00de6290
  • resolve the conflict in aiter/fused_moe.py
  • keep the later gfx942 FlyDSL clamped-SiLU fallback path while removing the reverted CK per-token/per-tensor runtime clamp expansion

Context

This was the high-confidence culprit from the Aiter failure report, but automatic revert could not create a PR because git revert --no-edit e3931369... conflicted.

Validation

  • python3 -m py_compile aiter/fused_moe.py aiter/ops/moe_op.py csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py
  • rg '<<<<<<<|=======|>>>>>>>' aiter/fused_moe.py
  • git diff --check HEAD~1..HEAD

@gyohuangxin
gyohuangxin requested a review from a team November 19, 2026 09:27
@gyohuangxin gyohuangxin self-assigned this Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 09:27

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the Radeon R9700 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 8294 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

@github-actions github-actions Bot changed the title [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU [CK] [JIT] [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU Nov 19, 2026
@aiter-bot

aiter-bot commented Nov 19, 2026 •

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 87d7208d2695 · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. Which architecture, dtype and shape boundaries select the changed kernel path, and what invariant prevents unsupported inputs from reaching it?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer
  • FAIL — changed op test not explained in Changed op tests: op_tests/test_moe_2stage.py
  • FAIL — Changed op tests must explain why each changed op test is necessary and non-redundant

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@gyohuangxin gyohuangxin added the ci:mi300x Run MI300X standard and OPUS CI on PRs label Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 10:41

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 12:27

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

…mped SiLU

Drop the revert of e393136 and fix the stale assumption in the dispatch
check instead.

test_plain_fp8_swiglu_limit_dispatch assumed a swiglu_limit always resolves
to a CK stage 1. On gfx942 per_Token FP8 it does not: when no tuned CK row
carries the requested limit, get_2stage_cfgs falls back to the FlyDSL
whole-graph backend, which applies the clamp itself and returns
MOEMetadata(None, None, ..., full_impl=...). The check then dereferenced
md.stage1 and died with AttributeError: 'NoneType' object has no attribute
'keywords' (run 44408312107, MI300X shard 5/8).

The kernels are correct; only the test's expectation predates the gfx942
FlyDSL clamped-SiLU fallback. Accept the whole-graph result explicitly and
assert what holds for it (no stage partials, no 1-stage, no ksplit), and
assert that the 0.0 / +inf no-clamp sentinels keep CK calls on CK.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 13:01

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot changed the title [CK] [JIT] [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU Nov 19, 2026
@zufayu zufayu changed the title [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU [fix] moe_2stage: accept the gfx942 FlyDSL whole-graph clamped SiLU Nov 19, 2026
zufayu
zufayu previously approved these changes Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:52

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

jhinpan added a commit to jonahbernard/aiter that referenced this pull request Nov 20, 2026
ROCm#8178 sends a gfx942 per_Token FP8 SiLU with an active swiglu_limit and no
tuned CK row to the FlyDSL whole-graph backend, which applies the clamp, and
checks the CK limits only when no FlyDSL backend takes the call.
test_plain_fp8_swiglu_limit_dispatch still assumed CK stage 1: it read
md.stage1.keywords on a FlyDSL result (AttributeError on MI300X), and it
expected NotImplementedError for per_Token at inter_dim 192, which FlyDSL
now serves.

The first two hunks are ROCm#8294's change. The inter_dim 192 expectation is the
assertion that ROCm#8294's own MI300X run still fails on.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 01:46

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot changed the title [fix] moe_2stage: accept the gfx942 FlyDSL whole-graph clamped SiLU [CK] [JIT] [fix] moe_2stage: accept the gfx942 FlyDSL whole-graph clamped SiLU Nov 20, 2026
@zufayu zufayu changed the title [CK] [JIT] [fix] moe_2stage: accept the gfx942 FlyDSL whole-graph clamped SiLU [CK] [JIT] [bot revert] Revert e3931369c: Clamp FP8 per_Token/per_Tensor SiLU Nov 20, 2026
@jatseng-ai

Copy link
Copy Markdown
Contributor

Please close this revert. Run 44408312107 crashes because test_plain_fp8_swiglu_limit_dispatch reads md.stage1.keywords, and the gfx942 FlyDSL clamped-SiLU fallback (#7820 / #8178) returns stage1=None. The CK runtime-limit clamp from e393136 (#7361) is the path that passes.

Reverting it deletes that clamp and keeps the fallback. The route is fixed in #8353: keep FlyDSL only when CK cannot clamp (inter_dim not a multiple of 128).

@zufayu

zufayu commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closing in favour of #8353.

This revert would take out the CK per_Token / per_Tensor runtime clamp from
#7361, which is not the broken part. The MI300X failure it was opened for
(AttributeError: 'NoneType' object has no attribute 'keywords', run
44408312107 shard 5/8) comes from the gfx942 dispatch resolving to the FlyDSL
whole-graph backend, whose metadata carries full_impl and no stage partials,
so md.stage1 is None.

#8353 fixes that at the dispatch: CK-capable FP8 shapes (inter_dim % 128 == 0)
go back to the CK clamp, shapes CK cannot serve (inter_dim 576) keep the FlyDSL
fallback, and both dispatch tests are updated to match. That keeps the feature
this PR would have removed.

The underlying accuracy problem with the FlyDSL clamp is tracked separately in
#8334.

@zufayu zufayu closed this Nov 20, 2026
@zufayu
zufayu deleted the xihuang/revert-e3931369-manual branch November 20, 2026 08:42
zufayu added a commit that referenced this pull request Nov 20, 2026
…rectly

gemm_moe_ck2stages_common_blockscale.cuh uses std::isfinite and
ck::MoeSilu::ValidRuntimeLimit at lines 45 and 50 but includes neither
<cmath> nor ck/tensor_operation/gpu/element/moe_silu.hpp. It compiled only
because the non-blockscale gemm_moe_ck2stages_common.cuh happens to pull
moe_silu.hpp in.

That is a latent build break: a generated instance includes exactly one
gemm_moe_ck2stages_common{quanttype}.cuh, so the blockscale TU never sees
the other header, and touching the includes of a sibling header takes the
per_1x128 blockscale instances down with:

  gemm_moe_ck2stages_common_blockscale.cuh:50:25: error: no member named
  'MoeSilu' in namespace 'ck'

Seen for real in #8294, where a revert dropped those two includes from the
non-blockscale header and broke module_moe_ck2stages_abi2_f8_f8_
preshuffle_on_b16_silu_per_1x128_mulWeightStage2_runtime_swiglu_limit.

Include what is used; no behavior change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
yifehuan pushed a commit that referenced this pull request Nov 26, 2026
…rectly (#8305)

gemm_moe_ck2stages_common_blockscale.cuh uses std::isfinite and
ck::MoeSilu::ValidRuntimeLimit at lines 45 and 50 but includes neither
<cmath> nor ck/tensor_operation/gpu/element/moe_silu.hpp. It compiled only
because the non-blockscale gemm_moe_ck2stages_common.cuh happens to pull
moe_silu.hpp in.

That is a latent build break: a generated instance includes exactly one
gemm_moe_ck2stages_common{quanttype}.cuh, so the blockscale TU never sees
the other header, and touching the includes of a sibling header takes the
per_1x128 blockscale instances down with:

  gemm_moe_ck2stages_common_blockscale.cuh:50:25: error: no member named
  'MoeSilu' in namespace 'ck'

Seen for real in #8294, where a revert dropped those two includes from the
non-blockscale header and broke module_moe_ck2stages_abi2_f8_f8_
preshuffle_on_b16_silu_per_1x128_mulWeightStage2_runtime_swiglu_limit.

Include what is used; no behavior change.

Co-authored-by: zufayu <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
zufayu pushed a commit that referenced this pull request Dec 3, 2026
…e/prefill kernels (#6277)

* [ASM] [MLA] Fix and optimize the gfx942 MLA decode/prefill kernels

Replace 20 gfx942 MLA code objects with fixed and optimized builds and add
one new kernel (32 heads, qlen 1). Kernel names, kernargs and grids are
unchanged, so every existing caller dispatches as before.

Bugs fixed (stock behavior):
- KV loads above 4 GiB: buffer_load offsets were page_id * stride in 32 bits
  (some kernels also took a 24-bit page id), so pools over 4 GiB read other
  tokens' KV. KV now loads with 64-bit global addresses in every kernel.
- Other 32-bit offset overflows (output/split data, kv_indptr, LSE, Q).
- Missing s_waitcnt before using load results (prologue KV tile, V transpose
  LDS reads, fp8 descales) -> stale data under memory pressure.
- MFMA -> VALU read hazard in the softmax (nondeterministic results).
- LDS races and missing barriers in the a8w8 qseqlen 1/2/4 kernels.
- 32x1 / 64x1 kernels: S == 1 null split pointer fault; the 32-head kernel
  ran one token per workgroup and was not causal for qlen > 1.
- qseqlen-2 a8w8 causal mask, PS empty work items, kv_scale handling in the
  paged qseqlen-4 PS kernel, reads of unwritten splits for qlen >= 9.

Dispatch: gqa_ratio 32, bf16, non-persistent now selects the new
MLA_A16W16_1TG_4W_32mx1_16nx1_Coex0_Msk1_QH16_Q1 kernel when
max_seqlen_q == 1 (new mla_asm.csv row) and the causal any-qlen kernel
otherwise.

Performance matches or beats stock on most measured shapes (up to ~20%
faster); the 64-bit KV addressing costs up to ~1.5% on a few memory-bound
shapes of the a8w8 qseqlen-4 kernels.

Tested on MI300X against an fp32/fp64 reference and a bit-exact oracle,
including KV pools above 4 GiB, injected stalls and 1 h soak runs, and with
op_tests (test_mla.py incl. the CI invocations, test_mla_persistent.py,
test_mla_sparse.py and the other MLA op_tests): all pass.

Signed-off-by: Jonah Bernard <[email protected]>

* [MLA] Extend test_mla_ltx.py gfx942 coverage to every fixed kernel

The gfx942 kv_address check now covers each MLA .co this PR fixes,
except the page_size 64 ds32 kernel. GFX942_PRESETS maps each preset
to the modes (nps / ps / prefill) that reach its kernels. The default
gfx942 run sweeps all of them: 84 cases, 20 kernels.

- FP8 and A16W8 configs, qlen 1-8, 8/16/32/64/128 heads
- mla_prefill_fwd (causal prefill) mode
- causal reference for qlen > 1; FP8-Q tolerance 6e-2
- persistent metadata uses the real Q/KV dtypes on gfx942
  (gfx950 keeps BF16)

gfx950 defaults and presets are unchanged.

Signed-off-by: Jonah Bernard <[email protected]>

* test_mla_ltx: cover the gfx942 page-64 ds32 MLA kernel at 4 GiB

Add qh16_ds32_q1/q2/q4 presets (uint8 KV) for
mla_a16w8_qh16_m16x4_n16x1_coex0_mask1_ps_page64_ds32. The harness packs fp8
nope, fp32 block scales and bf16 rope into 64-token pages and runs the
kv_address cases on them: one page below, across and above the 4 GiB boundary
(page 102,300), plus a 65-page context the metadata splits in two.

Signed-off-by: Jonah Bernard <[email protected]>

* [MLA] Pick the bf16 32-head qSeqLen 1 kernel only on gfx942

asm_mla.cu set config_max_seqlen_q = 1 for bf16 32-head non-persistent
decode with max_seqlen_q == 1 on every arch, but only the gfx942
mla_asm.csv has a qSeqLen 1 row for that config. get_heuristic_kernel_mla
needs an exact match, so gfx950 failed with "cannot get heuristic kernel".
Gate it on arch_id == "gfx942"; other archs use qSeqLen 0 as before.

Signed-off-by: Jonah Bernard <[email protected]>

* [ASM] [MLA] Fix the gfx950 MLA kernels and test the fp8 msk0 kernel in CI

Rebuild 12 gfx950 MLA .co files from the same sources as the gfx942
kernels in this PR (the .text matches the gfx942 builds). KV is read with
64-bit global loads, so pools above 4 GiB no longer wrap, and the
nondeterminism, the non-causal 64-head kernel, the 1-split fault in the
64-head kernel and the bf16-Q/fp8-KV PS fault are fixed.
mla_a8w8_qh128_m32x4_n16x2_msk0 has no gfx942 counterpart: it is the
fp8 128-head msk1 source built with MASK = 0. Kernel names and
mla_asm.csv rows are unchanged.

aiter_test.sh: on gfx950, add a test_mla.py run of non-causal fp8 decode
with qlen 2 and 4 (128 heads), which is the only path that reaches the
msk0 kernel.

Signed-off-by: Jonah Bernard <[email protected]>

* [HIP] [MLA] Add the missing barrier in mla_reduce_v1's massive row loop

In mla_reduce_v1_impl_massive (4 or more splits), warp 0 writes the LSE
scales of a row to p_lds_lse_scale, and every warp then reads them to
scale its part of the output. The row loop had no barrier after the
output pass, so when a block reduces more than one row (qlen > 1, or
folded heads), warp 0 could overwrite the scales with the next row's
while warp 1 was still reading them. Warp 1's dims (256-511) of that
row were then combined with the wrong row's weights.

This is the remaining failure in #6731: with this PR's stage-1 kernels,
the issue's repro (32 heads, qlen 4, 5 splits) gave 167 wrong calls in
400,000 on MI300X, each one token and one head in dims 256-511 only.
With the barrier: 0 in 400,000.

Signed-off-by: Jonah Bernard <[email protected]>

* [MLA] Add a test_mla_reduce case for the row-loop barrier

The previous commit's race needs many splits, many rows per workgroup and
a full GPU; none of the existing cases has all three, so they pass with
or without the barrier. The new case (16 heads, dv 512, 32 tiles x 64
splits x 32 rows) failed on every run without the barrier on MI300X (50
of 50, plus both dtypes of the full test on two GPUs) and passes with it.

Signed-off-by: Jonah Bernard <[email protected]>

* [ASM] [MLA] Apply the causal mask in bf16 128-head decode with qlen > 1

The non-persistent bf16 128-head decode always ran
mla_dec_stage1_bf16_a16w16_subQ128_mqa128, which has no causal mask, so
causal decode with qlen > 1 attended to future tokens (#6733).

Run mla_pfl_bf16_a16w16_causal_subQ128_mqa128 for that case instead. It is
the masked build of the same kernel and takes the decode arguments
unchanged. It skips splits past a query's last token, so stage 2 now uses
the per-query split count for it.

gfx950 ships the same two kernels (identical .text), so the fix covers it
too; it was only tested on gfx942.

Signed-off-by: Jonah Bernard <[email protected]>

* [Test] test_ar_norm_precedence: give the stand-in should_fly_allreduce_rmsnorm

#5670 made fused_allreduce_rmsnorm ask each communicator
should_fly_allreduce_rmsnorm() before the paths this test checks. The
CustomAllreduce stand-in from #8022 binds only the other routing gates,
so the custom_fused case past the Gluon limit raised AttributeError.
#8022's last CI ran on a base without #5670.

Bind the real gate with _fly_rms=None, which is its value on gfx1250,
where the FlyDSL fused engine does not build.

(cherry picked from commit 06ae37f)

* [Test] test_moe_2stage: accept the gfx942 FlyDSL clamped SiLU route

#8178 sends a gfx942 per_Token FP8 SiLU with an active swiglu_limit and no
tuned CK row to the FlyDSL whole-graph backend, which applies the clamp, and
checks the CK limits only when no FlyDSL backend takes the call.
test_plain_fp8_swiglu_limit_dispatch still assumed CK stage 1: it read
md.stage1.keywords on a FlyDSL result (AttributeError on MI300X), and it
expected NotImplementedError for per_Token at inter_dim 192, which FlyDSL
now serves.

The first two hunks are #8294's change. The inter_dim 192 expectation is the
assertion that #8294's own MI300X run still fails on.

* Revert "[Test] test_moe_2stage: accept the gfx942 FlyDSL clamped SiLU route"

This reverts commit fdcd7bd.

* [fused_moe] Keep CK-capable clamped SiLU off the gfx942 FlyDSL default

The whole-graph batch-1 and decode kernels clamp BF16 activations, so a
per-token call that CK can clamp was missing the per-token reference and
crashing the dispatch test on stage1 being None.

Co-authored-by: Cursor <[email protected]>
(cherry picked from commit ca91b9f)

* [MLA] Route gfx950 128-head bf16 causal qlen>1 decode to the masked prefill kernel too

mla_asm_decode_remap only forced ps=0 (and thus the masked-prefill-kernel
selection for causal qlen>1) on gfx942, so gfx950 kept running the plain
persistent decode kernel for this case, which has no per-query causal mask.
Meanwhile mla.py's masked_qh128_bf16 (which drives CAUSAL_PER_QUERY for the
stage-2 reduction) was already set for both gfx942 and gfx950, so stage 2
believed splits past each query's causal horizon were skipped on gfx950 too,
even though stage 1 never skipped them there.

gfx950 already ships and dispatches mla_pfl_bf16_a16w16_causal_subQ128_mqa128.co
(hsa/gfx950/mla/mla_asm.csv) with the 64-bit KV addressing fix from this PR,
so extending the gate just routes to an existing, already-tested kernel.

* Revert "[MLA] Route gfx950 128-head bf16 causal qlen>1 decode to the masked prefill kernel too"

This reverts commit 2cd4f38.

Forcing ps=0 for gfx950 128-head bf16 decode breaks every persistent
128-head bf16 decode on gfx950. The gfx950 block at the end of
mla_asm_decode_remap still tests `persistent`, not `ps`, and remaps the
shape to gqa 32 / qSeqLen 4. The lookup then asks for (gqa 32, ps 0,
qSeqLen 4), which hsa/gfx950/mla/mla_asm.csv does not have, so
test_mla_persistent.py, test_mla_persistent_round_robin.py and
test_mla_sparse.py fail on MI35X with "cannot get heuristic kernel!
... gqa:32 ps:0 ... qseqlen:4".

The CAUSAL_PER_QUERY concern does not need this change.
masked_qh128_bf16 only feeds the stage-2 reduction in the
non-persistent branch of mla_decode_fwd. That branch passes
num_kv_splits_indptr, so persistent is false and ps is already 0 on
gfx950: causal qlen > 1 already selects
mla_pfl_bf16_a16w16_causal_subQ128_mqa128 there. Persistent decode
reduces with mla_reduce_v1 and runs the qh32_qseqlen4 *_ps kernels,
which have causal and msk0 variants.

* [CI] [MLA] Gate the gfx950-only msk0 test on the live GPU arch

get_gfx() returns the last GPU_ARCHS entry. With GPU_ARCHS="gfx950;gfx942"
the gate read gfx942 on a gfx950 GPU and skipped the test; with
"gfx942;gfx950" it would run the gfx950-only kernel on gfx942.
get_gfx_runtime() reads the arch from rocminfo and ignores GPU_ARCHS.

---------

Signed-off-by: Jonah Bernard <[email protected]>
Co-authored-by: amd-bartgips <[email protected]>
Co-authored-by: Jin Pan <[email protected]>
Co-authored-by: jatseng-ai <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Jin Pan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:mi300x Run MI300X standard and OPUS CI on PRs CK JIT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants