Repository navigation
fix(plugins/aiter): move #354's gemm_n6144_k6144 and gemm_n6288_k7168 kernels under provider/gemm/impls - #366
Conversation
… kernels under provider/gemm/impls #354 was merged without a rebase onto #352, which moved the op families under provider/. Its two fixed kernels (bf74e6e2, 93d75fc2) landed at aklr/plugins/aiter/gemm/impls, outside the gemm op package, where nothing loads them, and the files they replace (feac6650, f1dc78b3) stayed under provider/ and kept being served without the fix. Move the two new files to provider/gemm/impls, byte for byte, and remove the two they replace, as #354 intended. The two kb pages that cite the old files now cite the new ones, and the strip page describes the in-stage reads.
There was a problem hiding this comment.
🔵 Needs a closer look
For m=32–60, delayed partner workgroups can exceed _SPIN_LIMIT, causing the kernel to consume unverified workspace data and silently produce incorrect results.
No open issues 🎉
What changed in this PR
Restores discovery of the FlyDSL GEMM variants containing #354’s LDS fixes by placing them under the aiter provider layout introduced in #352.
Changes:
- Adds the two replacement schemas under
provider/gemm/implsand withdraws their predecessors. - Preserves embedded kernel sources and workloads; default dispatch awaits CI measurements.
- Updates knowledge-base citations and clarifies the strip kernel’s in-stage reads.
| File | Description |
|---|---|
harness/skills/kb/cases/k3_bf16_splitk_wide_n.md |
Updates n6288 schema citations. |
harness/skills/kb/cases/bf16_small_m_column_strip.md |
Updates n6144 citations, read description, and measurement caveats. |
aklr/plugins/aiter/provider/gemm/impls/flydsl/gemm_n6288_k7168/f1dc78b3e8b7c074.json |
Withdraws the previous n6288 variant. |
aklr/plugins/aiter/provider/gemm/impls/flydsl/gemm_n6288_k7168/93d75fc23aa2cf3e.json |
Places the replacement n6288 variant in the discoverable package. |
aklr/plugins/aiter/provider/gemm/impls/flydsl/gemm_n6144_k6144/feac6650c272c5eb.json |
Withdraws the previous n6144 variant. |
aklr/plugins/aiter/provider/gemm/impls/flydsl/gemm_n6144_k6144/bf74e6e2b7edd005.json |
Places the replacement n6144 variant in the discoverable package. |
Review effort: Max
|
On Copilot's "Needs a closer look" ( The claim is right about the code, and it is not something this PR changes.
This PR moves #354's file byte for byte, so the hand-off is neither better nor worse than what is served now. Removing it means changing how the two K halves hand off (or withdrawing the m 32–60 path), which is a kernel change for a PR of its own; no code is changed here for it. |
Follows main's moves: the ops now live under aklr/plugins/aiter/provider (#327, #366), so the route imports flash_mla_with_kvcache from aklr.plugins.aiter.provider.mla and the K3 DCP verify schema moves there. The schema now carries #339's kernel (the same FlyDSL dense fp8 MLA decode, whose chunk partials are f16 and normalized by the probabilities the value GEMM reads), so its uuid is 6c9983e6c91c4680; workloads unchanged (rows 5-40 at the three pool sizes, table width 131073), measurements dropped for the bot. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Why
#354 was merged without a rebase onto #352, which moved every op family under
aklr/plugins/aiter/provider/. Its two fixed FlyDSL gemm kernels (bf74e6e2…for n6144 / k6144,93d75fc2…for n6288 / k7168) landed ataklr/plugins/aiter/gemm/impls, outside the gemm op package, where nothing loads them. The two files they replace (feac6650…,f1dc78b3…) stayed underprovider/and are still the ones served, so #354's race fixes are not in effect on main. This is the same slip #359 fixed forgemm_n19360_k6144.This moves the two new files to
aklr/plugins/aiter/provider/gemm/implsand removes the two they replace, which is the change #354 described.Scope
flydsl/gemm_n6144_k6144/feac6650c272c5eb.jsonandflydsl/gemm_n6288_k7168/f1dc78b3e8b7c074.json.aklr/plugins/aiter/gemm/no longer exists. Contracts and workload lists are unchanged.harness/skills/kb/cases/bf16_small_m_column_strip.mdandk3_bf16_splitk_wide_n.mdnow cite the new ones. The citedkernel.pyline numbers hold (both sources keep their line count; the changed lines are 84, 156-157, 241 and 120). The strip page said MFMA columns 24–31 read the next stage's bytes; it now says they read the stage's own B rows again, and that its measurements (E2) are of the earlier code.Verification
Environment: head
1a5d90cad, which merges main9e28ceecdinto9cd56c53cto resolve two modify/delete conflicts (main's measurement commits rewrote the two withdrawn files); the GPU run of the new head is pending. GPU run of9cd56c53c(ona8b1327f8): 45818663800. Local checks: CPU only, Python 3.12, torch 2.11.0+cpu.Gate overrides: none
Kernels
CI run 45818663800 on
9cd56c53c, before the merge of main:code-lint,aiter-test,sglang-test,vllm-testandcoverage-reportpassed. Its per-workload numbers are in the run's validation report and are not copied into a table here. The kernel sources are the ones #354 measured in itsci:gpurun 45761184135.What was run on this head:
Which files the gemm op package reads,
ContractRegistry.default().read_schemas("aklr.plugins.aiter.provider.gemm"):bf74e6e2…93d75fc2…feac6650…f1dc78b3…9e28ceecdpython -m aklr validate --base origin/main --stages audit --under <each directory>passes with no finding (log below).python -m aklr export checkexits 0.pytest tests/plugins/aiter tests/core tests/benchmarks/test_kernels_report.py: 1083 passed, 350 skipped, 1 failed. The failure,tests/core/runtime/test_dispatch.py::TestDispatcherRegistry::test_init_skips_schema_whose_requires_fails[0.3.2-True], isRuntimeError: Tried to instantiate dummy base class _cuda_isCurrentStreamCapturingfrom the CPU-only torch, and fails the same way on maina8b1327f8on this machine.python3 tests/check_layout.pypasses.Validation log
Not run
python -m aklr validate --base origin/main --stages audit,benchand the GPU tests were not run locally (no GPU on the machine at hand); they ran in the CI run above.provider/; this is the second time it happened (fix(plugins/aiter): move gemm_n19360_k6144 under provider/gemm/impls #359). Not added here, to keep this PR to kernels and documents.Risk
Affects: bf16
gemmn6144 / k6144 (m 1–128) and n6288 / k7168 (workloads up to m 2732, plus m 9397 and 16384): the served kernels become #354's fixed ones once CI measures them; until then these workloads fall back to aiter.If wrong: slower than the withdrawn kernels where the margin is thin (#354 reports four workloads demoted: n6144 m 32, n6288 m 24, 32, 48); outputs cannot become wrong from the added wait, per #354.
Undo:
git revertbrings back the two withdrawn files with their measurements and puts the new ones back at the unloaded path;[email protected]makes every gemm fall back.