Skip to content

[ASM] [HIP] Optimize gfx950 MXFP6 GEMMs for Ideogram DiT shapes - #7462

Merged
demonsan merged 3 commits into
mainfrom
perf/gfx950-mxfp6-ideogram-kernels
Nov 12, 2026
Merged

demonsan merged 3 commits into
mainfrom
perf/gfx950-mxfp6-ideogram-kernels

Conversation

@ksikiric

@ksikiric ksikiric commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add 13 shape-specialized gfx950 MXFP6 GEMM kernels (5 A6W6, 8 A6W4) and tuned configs for the 9 Ideogram DiT GEMM shapes: M in {10240, 25600, 33280} tokens per GPU, (N, K) in {(4608, 4608), (12288, 4608), (4608, 12288)}. Call-count-weighted DiT GEMM time improves by 4.3-5.9% for A6W6 and 9.7-11.3% for A6W4 over current main.

It also renames the five A6W6 kernels added in #4859 to the _ZN5aiter<len><name>E naming convention. Their code is unchanged.

Motivation

None of these shapes had tuned rows, so dispatch used the default kernels: f6gemm_dmabig_kernel_func for A6W6, and _ZN5aiter39f6f4gemm_bf16_per1x32Fp6Fp4_m32_s3_a4_tE (K=4608) or _ZN5aiter39f6f4gemm_bf16_per1x32Fp6Fp4_m32_s3_a5_tE (K=12288) for A6W4.

f6gemm_dmabig_kernel_func and its four variants were the only gfx950 MXFP GEMM kernels whose names did not follow the convention, and one of the new tuned rows selects the swz0 variant.

Changes

  • hsa/gfx950/f6gemm, hsa/gfx950/f6f4gemm: 13 new code objects and their manifest rows.
  • aiter/configs/a6w6_blockscale_tuned_gemm.csv, aiter/configs/a6w4_asm_tuned_gemm.csv: tuned rows for the 9 shapes per family, produced by gemm_a6w6_tune.py and gemm_a6w4_tune.py with the new kernels as candidates. All other rows are unchanged apart from the rename below.
    • 13 shape/family pairs select a new kernel.
    • 5 pairs select an existing kernel, because none of the shape-specialized candidates beat it:
      • A6W6 10240x4608x12288: _ZN5aiter44f6gemm_bf16_per1x32Fp6_dmabig_m82_g64_dscaleE
      • A6W6 25600x12288x4608: _ZN5aiter34f6gemm_bf16_per1x32Fp6_dmabig_swz0E
      • A6W6 33280x4608x4608: _ZN5aiter44f6gemm_bf16_per1x32Fp6_dmabig_m82_g16_dscaleE
      • A6W6 33280x4608x12288: _ZN5aiter44f6gemm_bf16_per1x32Fp6_dmabig_m82_all_dscaleE
      • A6W4 10240x4608x12288: _ZN5aiter44f6f4gemm_bf16_per1x32Fp6Fp4_dmabig_m82_s0_ntE
  • op_tests/test_mixed_mxfp_manifests.py, op_tests/test_mxfp_exact_shape_dispatch.py, op_tests/tuning_tests/test_a6w6_tuning.py: expected manifest row counts updated for the new kernels.
  • Rename of the five [ASM] [HIP] [CI] Mxfp6 gemms #4859 A6W6 kernels:
    • hsa/gfx950/f6gemm: the code objects are rebuilt from the same source under the new symbols and renamed to <name>.co, and their manifest rows are updated. Instructions and kernel descriptors are byte-identical to the previous code objects.
    • aiter/ops/gemm_op_a6w6.py, csrc/py_itfs_cu/asm_gemm_a6w6.cu: default and fallback kernel names.
    • aiter/configs/a6w6_blockscale_tuned_gemm.csv: the 11 existing rows that select these kernels.
    • op_tests/test_gemm_a6w6.py, op_tests/tuning_tests/test_a6w6_tuning.py: the new names, and the A6W6 manifest naming check now covers every row.
Old name New name
f6gemm_dmabig_kernel_func _ZN5aiter29f6gemm_bf16_per1x32Fp6_dmabigE
f6gemm_dmabig_swz0_kernel_func _ZN5aiter34f6gemm_bf16_per1x32Fp6_dmabig_swz0E
f6gemm_dmabig_grp16_kernel_func _ZN5aiter35f6gemm_bf16_per1x32Fp6_dmabig_grp16E
f6gemm_dmabig_grp64_kernel_func _ZN5aiter35f6gemm_bf16_per1x32Fp6_dmabig_grp64E
f6gemm_dmabig_allk_kernel_func _ZN5aiter34f6gemm_bf16_per1x32Fp6_dmabig_allkE

The kernels are generated by the DMABIG PyISA generators with new shape-specialization options:

  • Compile-time shape: the physical shape is baked in, with a shape guard and a static K loop of 12 K128 phases per iteration.
  • XCD-aware raster: each XCD processes a contiguous chunk of a grouped-M tile order.
  • A6W6 schedule: the A6W6 kernels use the MBLK=84 MFMA order with a later barrier; two of them also use 16-byte output stores.

Kernel suffixes: x<G> XCD raster with group G, m84 MBLK=84 BAR=16, w 16-byte stores, t temporal output stores, s0 natural raster. Every new kernel produces output bit-identical to the default kernel.

Performance

Before is current main's dispatch and After is this PR's dispatch. Change is the speedup of the DiT GEMM kernel time (main time / PR time - 1), weighted by Ideogram call counts per request: 1088 square, 544 FFN-up and 272 FFN-down GEMMs across both GPUs.

Hardware Workload/configuration Before After Change
MI355X (gfx950, 256 CUs) A6W6, Ideogram 2K im2im, M=10240 main this PR +5.6%
MI355X (gfx950, 256 CUs) A6W6, Ideogram 4K panorama, M=25600 main this PR +4.3%
MI355X (gfx950, 256 CUs) A6W6, Ideogram 4K t2im, M=33280 main this PR +5.9%
MI355X (gfx950, 256 CUs) A6W4, Ideogram 2K im2im, M=10240 main this PR +9.7%
MI355X (gfx950, 256 CUs) A6W4, Ideogram 4K panorama, M=25600 main this PR +10.8%
MI355X (gfx950, 256 CUs) A6W4, Ideogram 4K t2im, M=33280 main this PR +11.3%

Per-shape speedup over main:

Shape (MxNxK) A6W6 A6W4
10240x4608x4608 +5.6% +10.1%
10240x12288x4608 +7.1% +10.6%
10240x4608x12288 +2.6% +7.3%
25600x4608x4608 +4.8% +10.7%
25600x12288x4608 +3.4% +11.1%
25600x4608x12288 +5.3% +10.2%
33280x4608x4608 +2.6% +8.2%
33280x12288x4608 +9.6% +14.6%
33280x4608x12288 +3.6% +9.5%

Method: GEMM kernel time with pre-quantized operands (activation quantization is not included), four rotating operand sets, median of 10 x 200 launches, each kernel paired against the main kernel in the same job.

The us, tflops and bw columns of the new tuned rows come from the tuning node, which ran below nominal clocks. Dispatch only uses kernelName.

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X

The kernels are gfx950-only; everything was tested on MI355X (see "Validation and unverified scope").

Documentation

  • Docstrings updated
  • User guide updated
  • Performance guide updated
  • No documentation change is needed, with the reason stated below

AITER does not document individual MXFP6 GEMM kernels.

Dependencies

  • No new third-party dependencies added
  • New dependencies are listed and justified below

Breaking Changes

The five A6W6 kernels from #4859 are renamed (see the table under Changes). Code that passes an old name as kernelName, or lists one in its own tuned CSV, must use the new name. An old name now fails at launch with not find kernel.

PR Self-Review

Reviewed revision

392346f

Behavior and intent

For the 9 Ideogram DiT shapes, gemm_a6w6 and gemm_a6w4 now dispatch to the 13 new kernels or, for the other 5 shape/family pairs, to existing kernels selected by new tuned rows, instead of the default kernels. Dispatch for every other shape is unchanged.

The five #4859 A6W6 kernels keep their code and change only their names. The only Python and C++ changes are the default and fallback kernel names.

Validation and unverified scope

All on MI355X (gfx950):

  • pytest op_tests/test_gemm_a6w6.py op_tests/tuning_tests/test_a6w6_tuning.py op_tests/tuning_tests/test_csv_validation.py op_tests/test_mixed_mxfp_manifests.py: 46 passed, plus 48 subtests.
  • pytest op_tests/test_mxfp_exact_shape_dispatch.py -k a6w6: 32 passed. Every non-Wan A6W6 kernel with exact_M/N/K set, including the 5 new ones, is bit-identical to the renamed default kernel.
  • pytest op_tests/test_mxfp_exact_shape_dispatch.py -k "10240x or 25600x or 33280x": 13 passed; every new kernel is bit-identical to the default kernel.
  • Production dispatch: checked through gemm_a6w6 and gemm_a6w4 with the committed tuned CSVs for all 18 shape/family pairs. The expected kernel is selected and output is bit-identical to the default kernel.
  • Tuning: gemm_a6w6_tune.py and gemm_a6w4_tune.py on the 9 shapes with --all. Every selected kernel passed the gain guard against the default kernel.
  • Rename: the .text and .rodata (kernel descriptor) bytes of the five renamed code objects are identical to the previous code objects, and their metadata differs only in the kernel name. An old name fails at launch with not find kernel.

Unverified:

  • Other architectures (the kernels are gfx950-only).
  • The A6W4 and A4W6 cases of test_mxfp_exact_shape_dispatch.py for the existing Flux kernels, which this PR does not change.
  • End-to-end Ideogram inference; the model-level impact is projected from the GEMM times above.

PR-specific question

Which architecture, dtype and shape boundaries select the changed kernel path, and what invariant prevents unsupported inputs from reaching it?

  • Architecture: gfx950 with 256 CUs. The new code objects are under hsa/gfx950/, and the new tuned rows are keyed by gfx950 and cu_num=256, so other targets and CU counts never select them.
  • Dtype: A6W6 (MXFP6 E2M3 A and B) and A6W4 (MXFP6 A, MXFP4 E2M1 B), with per-1x32 E8M0 scales and bf16 output. The new manifest rows use the existing pack layouts (mxfp6_c0c1_256_padk2, mxfp6_mxfp4_c0_256_padk2), and the launchers check the layout and reject any output other than bf16.
  • Shapes: dispatch changes only for the 9 Ideogram shapes, through new tuned rows that match them exactly: M in {10240, 25600, 33280}, (N, K) in {(4608, 4608), (12288, 4608), (4608, 12288)}. Every other shape dispatches as before.
  • Invariants: each new kernel's manifest row sets exact_M/N/K, and the launcher rejects any other physical shape with an AITER_CHECK; the kernels also exit without writing if launched with a different M, N or K. test_mxfp_exact_shape_dispatch.py runs every new kernel on its shape and requires output bit-identical to the default kernel. The five renamed kernels keep their code, kernel descriptors and manifest bounds, so only their names change.

Changed op tests

  • op_tests/test_mixed_mxfp_manifests.py: the expected number of A6W4 manifest rows with exact_M/N/K set goes from 25 to 33 for the 8 new rows. This test checks manifest and code-object consistency: mangled names, code objects present, and tuned kernels listed in the manifest.
  • op_tests/test_mxfp_exact_shape_dispatch.py: the expected number of non-Wan manifest rows with exact_M/N/K set goes to 32 for A6W6 (from 27) and 30 for A6W4 (from 22). The test runs each of those kernels on its shape and requires output bit-identical to the default kernel, so it now covers the 13 new kernels.
  • op_tests/tuning_tests/test_a6w6_tuning.py: the expected number of A6W6 manifest rows with exact_M/N/K set goes from 30 to 35. The _ZN5aiter<len><name>E and co_name checks now run on every A6W6 manifest row instead of only rows with exact_M/N/K set; before, the five [ASM] [HIP] [CI] Mxfp6 gemms #4859 kernels were outside the check. The grp16 lookup uses the new name.
  • op_tests/test_gemm_a6w6.py: the five kernels are referenced by their new names. What the tests check is unchanged.

ksikiric and others added 3 commits November 4, 2026 03:13
Add tuned rows for M in {10240, 25600, 33280} with (N, K) in
{(4608, 4608), (12288, 4608), (4608, 12288)}. None of these shapes had a
tuned row, so dispatch used the default kernel.

Paired gain-guard speedups over the default kernel:
- A6W6: +2.2% to +4.7%; all 9 shapes switch kernels.
- A6W4: +4.1% to +9.3%; 8 of 9 shapes switch, 10240x4608x4608 keeps the
  default.
Add 13 exact-shape A6W6/A6W4 kernels for the Ideogram DiT GEMMs
(M in {10240, 25600, 33280}, (N, K) in {(4608, 4608), (12288, 4608),
(4608, 12288)}) and retune those shapes. The kernels bake in the
physical shape, run a static K loop and use an XCD-aware grouped
raster; the A6W6 kernels also use MBLK=84, and two of them 16-byte
output stores. Shapes without a faster specialization keep their tuned
generic kernel. All kernels match the default kernel bit for bit.

Call-count-weighted DiT GEMM speedup over current main
on MI355X: A6W6 +4.3% to +5.9%, A6W4 +9.7% to +11.3%.
…ames

f6gemm_dmabig_kernel_func and its swz0, grp16, grp64 and allk variants were
the only gfx950 MXFP GEMM kernels whose names did not follow the
_ZN5aiter<len><name>E convention, and an Ideogram tuned row selects the swz0
variant. Rebuild them from the same generator source under the mangled
names, rename the code objects to <name>.co, and update the manifest, the
default and fallback kernel names, the tuned rows and the tests.
Instructions and kernel descriptors are byte-identical to the previous code
objects.

The A6W6 manifest test now checks the name and code-object name of every
row. It only checked rows with exact_M/N/K set, so these five were never
checked.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
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 gfx1201 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 7462 --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.

@aiter-bot

aiter-bot commented Nov 4, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision 392346f6f93d · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

For the 9 Ideogram DiT shapes, `gemm_a6w6` and `gemm_a6w4` now dispatch to the 13 new kernels or, for the other 5 shape/family pairs, to existing kernels selected by new tuned rows, instead of the default kernels. Dispatch for every other shape is unchanged.

The five #4859 A6W6 kernels keep their code and change only their names. The only Python and C++ changes are the default and fallback kernel names.

Validation and unverified scope

All on MI355X (gfx950):

- `pytest op_tests/test_gemm_a6w6.py op_tests/tuning_tests/test_a6w6_tuning.py op_tests/tuning_tests/test_csv_validation.py op_tests/test_mixed_mxfp_manifests.py`: 46 passed, plus 48 subtests.
- `pytest op_tests/test_mxfp_exact_shape_dispatch.py -k a6w6`: 32 passed. Every non-Wan A6W6 kernel with `exact_M/N/K` set, including the 5 new ones, is bit-identical to the renamed default kernel.
- `pytest op_tests/test_mxfp_exact_shape_dispatch.py -k "10240x or 25600x or 33280x"`: 13 passed; every new kernel is bit-identical to the default kernel.
- **Production dispatch:** checked through `gemm_a6w6` and `gemm_a6w4` with the committed tuned CSVs for all 18 shape/family pairs. The expected kernel is selected and output is bit-identical to the default kernel.
- **Tuning:** `gemm_a6w6_tune.py` and `gemm_a6w4_tune.py` on the 9 shapes with `--all`. Every selected kernel passed the gain guard against the default kernel.
- **Rename:** the `.text` and `.rodata` (kernel descriptor) bytes of the five renamed code objects are identical to the previous code objects, and their metadata differs only in the kernel name. An old name fails at launch with `not find kernel`.

Unverified:

- Other architectures (the kernels are gfx950-only).
- The A6W4 and A4W6 cases of `test_mxfp_exact_shape_dispatch.py` for the existing Flux kernels, which this PR does not change.
- End-to-end Ideogram inference; the model-level impact is projected from the GEMM times above.

PR-specific question

**Which architecture, dtype and shape boundaries select the changed kernel path, and what invariant prevents unsupported inputs from reaching it?**

- **Architecture:** gfx950 with 256 CUs. The new code objects are under `hsa/gfx950/`, and the new tuned rows are keyed by `gfx950` and `cu_num=256`, so other targets and CU counts never select them.
- **Dtype:** A6W6 (MXFP6 E2M3 A and B) and A6W4 (MXFP6 A, MXFP4 E2M1 B), with per-1x32 E8M0 scales and bf16 output. The new manifest rows use the existing pack layouts (`mxfp6_c0c1_256_padk2`, `mxfp6_mxfp4_c0_256_padk2`), and the launchers check the layout and reject any output other than bf16.
- **Shapes:** dispatch changes only for the 9 Ideogram shapes, through new tuned rows that match them exactly: M in {10240, 25600, 33280}, (N, K) in {(4608, 4608), (12288, 4608), (4608, 12288)}. Every other shape dispatches as before.
- **Invariants:** each new kernel's manifest row sets `exact_M/N/K`, and the launcher rejects any other physical shape with an `AITER_CHECK`; the kernels also exit without writing if launched with a different M, N or K. `test_mxfp_exact_shape_dispatch.py` runs every new kernel on its shape and requires output bit-identical to the default kernel. The five renamed kernels keep their code, kernel descriptors and manifest bounds, so only their names change.

Changed op tests

- `op_tests/test_mixed_mxfp_manifests.py`: the expected number of A6W4 manifest rows with `exact_M/N/K` set goes from 25 to 33 for the 8 new rows. This test checks manifest and code-object consistency: mangled names, code objects present, and tuned kernels listed in the manifest.
- `op_tests/test_mxfp_exact_shape_dispatch.py`: the expected number of non-Wan manifest rows with `exact_M/N/K` set goes to 32 for A6W6 (from 27) and 30 for A6W4 (from 22). The test runs each of those kernels on its shape and requires output bit-identical to the default kernel, so it now covers the 13 new kernels.
- `op_tests/tuning_tests/test_a6w6_tuning.py`: the expected number of A6W6 manifest rows with `exact_M/N/K` set goes from 30 to 35. The `_ZN5aiter<len><name>E` and `co_name` checks now run on every A6W6 manifest row instead of only rows with `exact_M/N/K` set; before, the five #4859 kernels were outside the check. The `grp16` lookup uses the new name.
- `op_tests/test_gemm_a6w6.py`: the five kernels are referenced by their new names. What the tests check is unchanged.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

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

@ksikiric
ksikiric marked this pull request as ready for review November 4, 2026 14:41
@ksikiric
ksikiric requested review from a team and a balanced review from Copilot November 4, 2026 14:41
@github-actions github-actions Bot changed the title [ASM] [Config] Optimize gfx950 MXFP6 GEMMs for Ideogram DiT shapes [ASM] [HIP] Optimize gfx950 MXFP6 GEMMs for Ideogram DiT shapes Nov 4, 2026

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.

🔵 Needs a closer look

The new gfx950 kernels alter production dispatch, but GPU execution is unavailable and no head-matched report was supplied to validate numerical parity and paired base/head latency.

No open issues 🎉

What changed in this PR

Optimizes gfx950 MXFP6 GEMM dispatch for nine Ideogram DiT shapes, extending AITER’s existing A6W6 and A6W4 support with shape-specialized kernels and tuned selections.

Changes:

  • Registers 13 specialized kernels and adds nine tuned configurations per family.
  • Renames five existing A6W6 kernels and updates default, fallback, and tuned references.
  • Updates test expectations for the expanded manifests and extends naming checks to every A6W6 manifest row.
File Description
op_tests/​tuning_tests/​test_a6w6_tuning.py Updates kernel counts and checks naming across all manifest rows.
op_tests/​test_mxfp_exact_shape_dispatch.py Expands expected specialized-kernel counts.
op_tests/​test_mixed_mxfp_manifests.py Updates the expected A6W4 specialized-kernel count.
op_tests/​test_gemm_a6w6.py Uses renamed A6W6 kernels in existing tests.
hsa/​gfx950/​f6gemm/​f6gemm_bf16_per1x32Fp6.csv Registers five specializations and renames five existing entries.
hsa/​gfx950/​f6f4gemm/​f6f4gemm_bf16_per1x32Fp6Fp4.csv Registers eight A6W4 specializations.
csrc/​py_itfs_cu/​asm_gemm_a6w6.cu Updates the native default kernel name.
aiter/​ops/​gemm_op_a6w6.py Updates Python default and fallback kernel names.
aiter/​configs/​a6w6_blockscale_tuned_gemm.csv Adds nine tuned selections and updates renamed references.
aiter/​configs/​a6w4_asm_tuned_gemm.csv Adds nine tuned selections for Ideogram shapes.

Review effort: Balanced

@demonsan demonsan 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.

LGTM

@demonsan
demonsan merged commit 66be4f6 into main Nov 12, 2026
@demonsan
demonsan deleted the perf/gfx950-mxfp6-ideogram-kernels branch November 12, 2026 11:44
vpietila-amd pushed a commit that referenced this pull request Nov 13, 2026
* [Config] Tune gfx950 MXFP6 A6W6 and A6W4 GEMMs for Ideogram DiT shapes

Add tuned rows for M in {10240, 25600, 33280} with (N, K) in
{(4608, 4608), (12288, 4608), (4608, 12288)}. None of these shapes had a
tuned row, so dispatch used the default kernel.

Paired gain-guard speedups over the default kernel:
- A6W6: +2.2% to +4.7%; all 9 shapes switch kernels.
- A6W4: +4.1% to +9.3%; 8 of 9 shapes switch, 10240x4608x4608 keeps the
  default.

* [ASM] Add shape-specialized gfx950 MXFP6 GEMMs for Ideogram DiT shapes

Add 13 exact-shape A6W6/A6W4 kernels for the Ideogram DiT GEMMs
(M in {10240, 25600, 33280}, (N, K) in {(4608, 4608), (12288, 4608),
(4608, 12288)}) and retune those shapes. The kernels bake in the
physical shape, run a static K loop and use an XCD-aware grouped
raster; the A6W6 kernels also use MBLK=84, and two of them 16-byte
output stores. Shapes without a faster specialization keep their tuned
generic kernel. All kernels match the default kernel bit for bit.

Call-count-weighted DiT GEMM speedup over current main
on MI355X: A6W6 +4.3% to +5.9%, A6W4 +9.7% to +11.3%.

* [ASM] Rename the gfx950 A6W6 DMABIG kernels from #4859 to _ZN5aiter names

f6gemm_dmabig_kernel_func and its swz0, grp16, grp64 and allk variants were
the only gfx950 MXFP GEMM kernels whose names did not follow the
_ZN5aiter<len><name>E convention, and an Ideogram tuned row selects the swz0
variant. Rebuild them from the same generator source under the mangled
names, rename the code objects to <name>.co, and update the manifest, the
default and fallback kernel names, the tuned rows and the tests.
Instructions and kernel descriptors are byte-identical to the previous code
objects.

The A6W6 manifest test now checks the name and code-object name of every
row. It only checked rows with exact_M/N/K set, so these five were never
checked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants