Skip to content

[ASM] [HIP] gfx1250 mha bwd: hd64 kernels and hd128 border mask - #7160

Merged
shay-li77 merged 1 commit into
mainfrom
jim/dev/mi400_bwd_hd64
Nov 3, 2026
Merged

shay-li77 merged 1 commit into
mainfrom
jim/dev/mi400_bwd_hd64

Conversation

@slippedJim

@slippedJim slippedJim commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Add head dim 64 to the gfx1250 (MI450) mha bwd asm path, and the border mask to the hd128 non-causal kernels.

Technical Details

Kernels (hsa/gfx1250/fmha_v3_bwd)

  • hd64: dqdkdv in 8 variants (batch/group × no mask/causal × stock/deterministic), dq_convert × 4 and odo × 2, with a CSV row for each. The hd64 dqdkdv covers 256 kv rows per workgroup, hence ts = 256.
  • hd128: the 4 non-causal dqdkdv kernels are rebuilt with the border mask. In the last, partial kv tile, keys past seqlen_k get S = -inf before exp, so a row whose LSE is below about -88 can no longer turn those zero-filled keys into inf * 0 = NaN in dQ. dq_convert and odo are unchanged.
  • Every hd64 and hd128 dqdkdv object takes its dQ atomics at CU scope, like the hd192_128 objects of [ASM] [HIP] gfx1250 mha bwd d192 d128 kernel integration #6996, so the 4 hd128 causal dqdkdv objects change too (same code, CU scope). There is no _perf.co any more: the 8 hd128 ones are deleted (nothing has loaded them since [ASM] [HIP] gfx1250 mha bwd d192 d128 kernel integration #6996), and none is added for hd64.

Host (csrc/cpp_itfs/mha_bwd.cu)

  • hd64 needs no host change: the tile sizes come from the CSV, and the dQ_acc layout and grid are those of hd128.
  • Deterministic mode with det_split = 0: the plane count is halved under a causal mask when the kv tile count caps it and is at least 16. A causal dqdkdv saturates at half the planes, while dq_convert reads every plane. It only fires on few-head shapes (results below); none of the shapes in the performance table hit it.

Docs (op_tests/cpp/mha/README.md): a gfx1250 section with the feature list (hdim 64, 128 and 192/128) and the performance below; the gfx1250 note in the bwd section now points to it.

Test Plan

gfx1250 (MI450 engineering sample), docker rocm/fw-bringup:gfx1250-atom-20260923, amdgpu-dkms 7.1.0.31300009. aiter built asm-only (GPU_ARCHS=gfx1250 python3 compile.py --api=bwd_v3, ENABLE_CK=0), with benchmark_mha_bwd_v3.cpp linked as bwd.exe.

Function: bwd.exe -prec=bf16 -v=1 against the CPU reference. Deterministic cases also rerun twice and compare dq/dk/dv bit for bit (-dtm_runs=2), and every case checks that the three kernels it loaded belong to its head dim.

  • hdim 64 and 128 × batch/group × no mask/causal × stock/deterministic over a seqlen_q × seqlen_k grid on the edges of the 32-row q tile and the 128/256-row kv tiles (seqlen_q 1 to 513, seqlen_k 16 to 769), with MHA/GQA/MQA and bshd/bhsd rotating across the grid
  • top-left causal with seqlen_q == seqlen_k; group mode with padding (-s_pad, so cu_seqlen_* next to padded seqstart_*) and with -seqlen_ptr=1; explicit det_split (1, 3, and 64 clamped to the kv tile count); shapes up to s=3000, where up to 24 workgroups add into every dQ row
  • hdim 192/128 ([ASM] [HIP] gfx1250 mha bwd d192 d128 kernel integration #6996's kernels) through the merged configs: batch/group × no mask/causal × stock/deterministic
  • configs without a gfx1250 asm kernel must print not supported and load nothing: fp16, -v3_atomic_fp32=0, hdim 32/48/80/96/192/256, hdim_q != hdim_v other than 192/128, group-mode top-left, window mask

Performance: bwd.exe -prec=bf16 -iperm=1 -operm=1 -v=0 -warmup=20 -repeat=50, random inputs, median of 3.

gfx942 / gfx950: the kernels and CSV rows are gfx1250 only, and the host change sits in the gfx1250 deterministic branch.

Test Result

Function on the CU-scope objects: 666/666 pass, 16 of them hdim 192/128. The same matrix on the earlier device-scope objects, with a denser seqlen grid: 833/833.

Performance, ms / TFLOPS of the whole backward (odo + dqdkdv + dq_convert), MHA, seqlen_q == seqlen_k. TFLOPS counts 2 * b * h * sq * sk * (3 * hdim_q + 2 * hdim_v), halved under the causal mask, so hdim 64 does half the FLOPs of hdim 128 on the same shape.

mode batch nheads seqlen causal hdim 64 hdim 128 hdim 64, deterministic hdim 128, deterministic
batch 4 64 8192 no 4.898 / 2245 10.526 / 2089 6.331 / 1737 17.556 / 1253
batch 4 64 8192 yes 2.817 / 1952 6.362 / 1728 3.263 / 1685 8.964 / 1227
batch 8 32 4096 no 1.140 / 2411 2.764 / 1989 1.316 / 2089 4.495 / 1223
batch 8 32 4096 yes 0.648 / 2122 1.550 / 1774 0.698 / 1969 2.215 / 1241
batch 16 16 2048 no 0.320 / 2150 0.659 / 2085 0.334 / 2060 0.889 / 1546
batch 16 16 2048 yes 0.216 / 1591 0.440 / 1561 0.216 / 1589 0.516 / 1332
batch 1 16 16384 no 1.018 / 2699 2.545 / 2160 1.223 / 2247 3.716 / 1479
batch 1 16 16384 yes 0.524 / 2622 1.271 / 2163 0.621 / 2213 1.734 / 1585
batch 4 8 8192 no 0.516 / 2666 1.187 / 2316 0.581 / 2366 1.666 / 1650
batch 4 8 8192 yes 0.292 / 2355 0.608 / 2260 0.341 / 2014 0.794 / 1731
group 4 64 8192 no 5.060 / 2173 10.700 / 2056 6.481 / 1697 17.718 / 1241
group 4 64 8192 yes 2.848 / 1931 6.458 / 1703 3.305 / 1663 9.015 / 1220
group 8 32 4096 no 1.204 / 2285 2.832 / 1942 1.413 / 1946 4.556 / 1207
group 8 32 4096 yes 0.687 / 2002 1.569 / 1753 0.714 / 1926 2.225 / 1236
  • The table was measured on the device-scope objects. The CU-scope ones time the same: back to back at b=4 h=64 s=8192 hdim 128 they take 0.98x to 1.00x the time (median 1.00x over 7 pairs), and a partial re-run of the table on them (56 configurations) lands at 0.999x of it on median.
  • bshd is within 1% of bhsd at b=4 h=64 s=8192.
  • The window matters on this part: the clocks drop under sustained load, so longer windows read slower (b=16 h=16 s=2048 hdim 128: 0.66 ms at 20/50, 0.80 ms at 100/200). The table uses 20/50, the window of the MI300X/MI355X numbers in the README.

Default det_split on shapes where the causal halving fires (causal, deterministic, median of 3):

shape hdim non-deterministic previous default new default new / previous
b=1 h=4 s=8192 128 0.139 ms 0.203 ms (64 planes) 0.179 ms (32 planes) 0.88
b=1 h=4 s=4096 128 0.072 ms 0.097 ms (32 planes) 0.086 ms (16 planes) 0.89
b=1 h=4 s=8192 64 0.114 ms 0.136 ms (32 planes) 0.128 ms (16 planes) 0.94
b=1 h=8 s=8192 64 0.128 ms 0.159 ms (32 planes) 0.151 ms (16 planes) 0.95

Submission Checklist

PR Self-Review

Reviewed revision

6b37add719cd

Behavior and intent

On gfx1250 an aiter::mha_bwd call with hdim_q == hdim_v == 64 found no asm kernel, so fmha_v3_bwd returned -1 and the asm-only build could not run it at all. This PR adds the hd64 odo, dqdkdv and dq_convert kernels in every variant hd128 has (batch/group, no mask/causal, stock/deterministic). The hd128 non-causal dqdkdv kernels did not mask the keys past seqlen_k in the last, partial kv tile; those keys are zero-filled, so a row whose LSE is below about -88 got P = exp(-LSE) = inf for them and NaN in dQ. They now set S = -inf there. Every hd64/hd128 dqdkdv object now accumulates dQ with CU-scope atomics, matching the hd192_128 objects of #6996, and the _perf.co copies nothing loads any more are deleted. In deterministic mode the default plane count is halved under a causal mask when the kv tile count caps it and is at least 16, which takes 5% to 12% off the few-head causal shapes where it fires.

Validation and unverified scope

Hardware: gfx1250 (MI450 engineering sample), docker rocm/fw-bringup:gfx1250-atom-20260923, amdgpu-dkms 7.1.0.31300009. Build: GPU_ARCHS=gfx1250 python3 compile.py --api=bwd_v3 (asm-only, ENABLE_CK=0), with benchmark_mha_bwd_v3.cpp linked as bwd.exe.

  • Function: bwd.exe -prec=bf16 -v3_atomic_fp32=1 -v=1 against the CPU reference, deterministic cases with -deterministic=1 -dtm_runs=2 (dq/dk/dv bit-identical across reruns), and each case checks the three loaded kernels belong to its head dim. Matrix: hdim 64/128 × batch/group × no mask/causal × stock/deterministic over seqlen_q 1 to 513 × seqlen_k 16 to 769 with MHA/GQA/MQA and bshd/bhsd, plus -mask=t with seqlen_q == seqlen_k, -s_pad, -seqlen_ptr=1, -det_split=1|3|64, shapes up to s=3000, 16 hdim 192/128 cases, and configs that must print not supported without loading a kernel. Result on the code objects of this revision: 666/666 passed. The same matrix with a denser seqlen grid on the earlier device-scope objects: 833/833 passed.
  • Performance: bwd.exe -prec=bf16 -iperm=1 -operm=1 -v=0 -warmup=20 -repeat=50, median of 3, in the tables above.
  • CI on this revision: Black, Ruff, the dependency check, Aiter Test Gate and the C++ Interface Tests on MI300X and MI35X passed.

Unverified: the performance table was measured on the device-scope objects; the CU-scope ones were only re-timed back to back on a subset (0.98x to 1.00x) and on 56 of the table's configurations (0.999x on median). The Python entry points were not run, because can_impl_fmha_v3_bwd and can_impl_fmha_v3_bwd_gfx950 only accept gfx942 and gfx950, so on gfx1250 they never reach this asm path. hdim 192/128 got only the 16 smoke cases. gfx942/gfx950 were not run on hardware beyond CI; their kernels, CSV rows and host branches are untouched.

PR-specific question

The changed kernels are reachable only through fmha_v3_bwd in csrc/cpp_itfs/mha_bwd.cu on an arch reported as gfx1250: the CSV rows live under hsa/gfx1250/ and every generated config key starts with the arch, so no other arch matches them. get_heuristic_kernel picks a dqdkdv row only on an exact match of dtype bf16, padded hdim_q/hdim_v (64/64, 128/128 or 192/128) with pddv == 0, mask type (0, or bottom-right 2; top-left is remapped to 2 only in batch mode with seqlen_q == seqlen_k), atomic32 == 1, batch or group mode, and deterministic or not. A head dim that pads up to 64 or 128 (32, 48, 80, 96, ...) needs pddv == 1, which no gfx1250 row has. Any miss, as well as fp16, v3_atomic_fp32 = 0, bias, dbias, dropout, a window or generic mask, or a dQ_acc plane past the 32-bit range the kernels address it in, makes fmha_v3_bwd return -1 before a kernel is loaded or launched. Within that, any seqlen_q/seqlen_k is supported; the hd64 grid, Ts and deterministic plane cap come from its CSV row's ts = 256. The det_split change only runs on gfx1250 with is_deterministic and det_split == 0; other archs reject deterministic requests up front.

Changed op tests

op_tests/cpp/mha/README.md is the only changed file under op_tests/, and it is documentation rather than a test: it adds the gfx1250 section (the feature list for hdim 64, 128 and 192/128, the border-mask and deterministic behavior, and the performance table) and replaces the long gfx1250 note in the bwd section with a pointer to it. No test code changed. The existing benchmark_mha_bwd_v3.cpp (bwd.exe) already reaches the new hd64 path through -d=64 and was what the validation above ran, so no new op test is needed and nothing duplicates an existing one.

@slippedJim
slippedJim requested a review from a team October 29, 2026 13:13
Copilot AI balanced review requested due to automatic review settings October 29, 2026 13:13
@github-actions

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 7160 --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 Oct 29, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision 6b37add719cd · 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

On gfx1250 an `aiter::mha_bwd` call with `hdim_q == hdim_v == 64` found no asm kernel, so `fmha_v3_bwd` returned -1 and the asm-only build could not run it at all. This PR adds the hd64 odo, dqdkdv and dq_convert kernels in every variant hd128 has (batch/group, no mask/causal, stock/deterministic). The hd128 non-causal dqdkdv kernels did not mask the keys past `seqlen_k` in the last, partial kv tile; those keys are zero-filled, so a row whose LSE is below about -88 got `P = exp(-LSE) = inf` for them and NaN in dQ. They now set `S = -inf` there. Every hd64/hd128 dqdkdv object now accumulates dQ with CU-scope atomics, matching the hd192_128 objects of #6996, and the `_perf.co` copies nothing loads any more are deleted. In deterministic mode the default plane count is halved under a causal mask when the kv tile count caps it and is at least 16, which takes 5% to 12% off the few-head causal shapes where it fires.

Validation and unverified scope

Hardware: gfx1250 (MI450 engineering sample), docker `rocm/fw-bringup:gfx1250-atom-20260923`, amdgpu-dkms 7.1.0.31300009. Build: `GPU_ARCHS=gfx1250 python3 compile.py --api=bwd_v3` (asm-only, `ENABLE_CK=0`), with `benchmark_mha_bwd_v3.cpp` linked as `bwd.exe`.

- Function: `bwd.exe -prec=bf16 -v3_atomic_fp32=1 -v=1` against the CPU reference, deterministic cases with `-deterministic=1 -dtm_runs=2` (dq/dk/dv bit-identical across reruns), and each case checks the three loaded kernels belong to its head dim. Matrix: hdim 64/128 × batch/group × no mask/causal × stock/deterministic over `seqlen_q` 1 to 513 × `seqlen_k` 16 to 769 with MHA/GQA/MQA and bshd/bhsd, plus `-mask=t` with `seqlen_q == seqlen_k`, `-s_pad`, `-seqlen_ptr=1`, `-det_split=1|3|64`, shapes up to s=3000, 16 hdim 192/128 cases, and configs that must print `not supported` without loading a kernel. Result on the code objects of this revision: 666/666 passed. The same matrix with a denser seqlen grid on the earlier device-scope objects: 833/833 passed.
- Performance: `bwd.exe -prec=bf16 -iperm=1 -operm=1 -v=0 -warmup=20 -repeat=50`, median of 3, in the tables above.
- CI on this revision: Black, Ruff, the dependency check, Aiter Test Gate and the C++ Interface Tests on MI300X and MI35X passed.

Unverified: the performance table was measured on the device-scope objects; the CU-scope ones were only re-timed back to back on a subset (0.98x to 1.00x) and on 56 of the table's configurations (0.999x on median). The Python entry points were not run, because `can_impl_fmha_v3_bwd` and `can_impl_fmha_v3_bwd_gfx950` only accept gfx942 and gfx950, so on gfx1250 they never reach this asm path. hdim 192/128 got only the 16 smoke cases. gfx942/gfx950 were not run on hardware beyond CI; their kernels, CSV rows and host branches are untouched.

PR-specific question

The changed kernels are reachable only through `fmha_v3_bwd` in `csrc/cpp_itfs/mha_bwd.cu` on an arch reported as `gfx1250`: the CSV rows live under `hsa/gfx1250/` and every generated config key starts with the arch, so no other arch matches them. `get_heuristic_kernel` picks a dqdkdv row only on an exact match of dtype `bf16`, padded `hdim_q`/`hdim_v` (64/64, 128/128 or 192/128) with `pddv == 0`, mask type (0, or bottom-right 2; top-left is remapped to 2 only in batch mode with `seqlen_q == seqlen_k`), `atomic32 == 1`, batch or group mode, and deterministic or not. A head dim that pads up to 64 or 128 (32, 48, 80, 96, ...) needs `pddv == 1`, which no gfx1250 row has. Any miss, as well as fp16, `v3_atomic_fp32 = 0`, bias, dbias, dropout, a window or generic mask, or a dQ_acc plane past the 32-bit range the kernels address it in, makes `fmha_v3_bwd` return -1 before a kernel is loaded or launched. Within that, any `seqlen_q`/`seqlen_k` is supported; the hd64 grid, `Ts` and deterministic plane cap come from its CSV row's `ts = 256`. The `det_split` change only runs on gfx1250 with `is_deterministic` and `det_split == 0`; other archs reject deterministic requests up front.

Changed op tests

`op_tests/cpp/mha/README.md` is the only changed file under `op_tests/`, and it is documentation rather than a test: it adds the gfx1250 section (the feature list for hdim 64, 128 and 192/128, the border-mask and deterministic behavior, and the performance table) and replaces the long gfx1250 note in the bwd section with a pointer to it. No test code changed. The existing `benchmark_mha_bwd_v3.cpp` (`bwd.exe`) already reaches the new hd64 path through `-d=64` and was what the validation above ran, so no new op test is needed and nothing duplicates an existing one.

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.

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 binary-only gfx1250 kernels lack assembly sources and head-matched MI450 runtime validation needed to independently verify border-mask correctness, deterministic splitting, and performance.

No open issues 🎉

What changed in this PR

Extends gfx1250 (MI450) assembly attention backward support to head dimension 64 and documents the head-dimension-128 border-mask fix for partial key tiles.

Changes:

  • Registers head-dimension-64 kernels for gradient computation, dQ conversion, and preprocessing across batch/group and deterministic variants.
  • Reduces the default deterministic plane count for causal attention when capped by at least 16 key/value tiles.
  • Documents supported configurations, kernel behavior, and MI450 performance results.
File Description
op_tests/​cpp/​mha/​README.md Adds gfx1250 capabilities, border-mask details, and performance measurements.
hsa/​gfx1250/​fmha_v3_bwd/​fmha_bwd_odo.csv Registers head-dimension-64 preprocessing kernels.
hsa/​gfx1250/​fmha_v3_bwd/​fmha_bwd_dqdkdv.csv Registers eight head-dimension-64 gradient variants with 256-row key/value tiles.
hsa/​gfx1250/​fmha_v3_bwd/​fmha_bwd_dq_convert.csv Registers four head-dimension-64 dQ conversion variants.
csrc/​cpp_itfs/​mha_bwd.cu Adjusts automatic deterministic plane selection for causal attention on gfx1250.

Review effort: Balanced

@zufayu
zufayu requested a review from shay-li77 October 30, 2026 01:26
@slippedJim
slippedJim force-pushed the jim/dev/mi400_bwd_hd64 branch from 9537b54 to f6199d2 Compare October 30, 2026 10:43
Copilot AI balanced review requested due to automatic review settings October 30, 2026 10:43
* hd64 bwd chain for gfx1250 (odo, dqdkdv, dq_convert) in every variant the
  hd128 chain has: batch/group, no mask/causal, stock/deterministic. The hd64
  dqdkdv covers 256 kv rows per workgroup (ts = 256).
* hd128 non-causal dqdkdv rebuilt with the border mask, which sets S = -inf
  for the keys past seqlen_k in the last kv tile.
* Every hd64 and hd128 dqdkdv object takes its dQ atomics at CU scope, like
  the hd192_128 ones, and the _perf.co builds are gone.
* Deterministic: the default plane count is halved under a causal mask when
  the kv tile count caps it and is at least 16.
* README: gfx1250 feature list and performance.

Signed-off-by: Jim,Guo <[email protected]>
Co-authored-by: Cursor <[email protected]>
@slippedJim
slippedJim force-pushed the jim/dev/mi400_bwd_hd64 branch from f6199d2 to 6b37add Compare October 30, 2026 10:47

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

Static manifest/export checks passed, but the gfx1250 binary border-mask and CU-scope atomic changes could not be independently validated for runtime correctness, determinism, or performance.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 30, 2026 10:47

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

Numerical correctness and cross-CU dQ coherence depend on gfx1250 assembly and CU-scope atomics that symbol checks alone cannot validate, and no independent GPU runtime validation was available.

No open issues 🎉

Review effort: Balanced

@shay-li77 shay-li77 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

@shay-li77
shay-li77 merged commit 5f964a1 into main Nov 3, 2026
37 of 38 checks passed
@shay-li77
shay-li77 deleted the jim/dev/mi400_bwd_hd64 branch November 3, 2026 06:11
shantipriya-amd pushed a commit to shantipriya-amd/aiter that referenced this pull request Nov 18, 2026
…#7160)

* hd64 bwd chain for gfx1250 (odo, dqdkdv, dq_convert) in every variant the
  hd128 chain has: batch/group, no mask/causal, stock/deterministic. The hd64
  dqdkdv covers 256 kv rows per workgroup (ts = 256).
* hd128 non-causal dqdkdv rebuilt with the border mask, which sets S = -inf
  for the keys past seqlen_k in the last kv tile.
* Every hd64 and hd128 dqdkdv object takes its dQ atomics at CU scope, like
  the hd192_128 ones, and the _perf.co builds are gone.
* Deterministic: the default plane count is halved under a causal mask when
  the kv tile count caps it and is at least 16.
* README: gfx1250 feature list and performance.

Signed-off-by: Jim,Guo <[email protected]>
Co-authored-by: Cursor <[email protected]>
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