SIGN IN SIGN UP

[rocm-libraries] ROCm/rocm-libraries#10026 (commit 6af1d28)

[CK_TILE] Retune RDNA FMHA D128 tile selection after pipeline
 update (#10026)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

## Motivation

The FMHA forward pipeline changed in
[5961a2e](https://github.com/ROCm/rocm-libraries/commit/5961a2e8eb8425b191e1117bf174345765d37b15),
shifting the optimal D128 tile from `64x64` to `128x64`.
This PR fixes the performance regression on RDNA for sequence lengths ≤
4096 introduced in #6498.

## Technical Details

- Remove the `64x64` D128 tile and its sequence-length constraint from
the GFX11 and GFX12 FMHA forward kernel tables.
- Use `128x64` for D128 at all sequence lengths.
- GFX115 targets inherit the updated GFX11 tile selection.
- This only changes kernel selection and does not modify the pipeline's
numerical behavior.

## Test Plan

- Compared the baseline and updated tile selection on `gfx1100`,
`gfx1151`, and `gfx1201`.
- Tested BF16 BSHD forward with `B=1`, `H=24`, `hdim=128`, batch/group
APIs, and sequence lengths 1024 and 4096.

## Test Result

The table shows candidate throughput relative to baseline.

| GPU | Mode | L=1024 | L=4096 |
|---|---|---:|---:|
| gfx1100 | batch | +10.99% | +2.90% |
| gfx1100 | group | +10.69% | -2.22% |
| gfx1151 | batch | +10.57% | +0.59% |
| gfx1151 | group | +10.71% | -0.23% |
| gfx1201 | batch | +12.75% | +11.42% |
| gfx1201 | group | +12.88% | +11.41% |

On `gfx1100` and `gfx1151`, L=4096 already uses `128x64` in both
versions, so the differences represent same-kernel measurement
variation.
On `gfx1201`, both tested sequence lengths change from `64x64` to
`128x64` and improve by approximately 11–13%.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
H
Hosang Yoon committed
dbe2999ed542aa14b1ffa2a24e84daa939332632
Parent: 8fc1ac2
Committed by assistant-librarian[bot] <assistant-librarian[bot]@users.noreply.github.com> on 7/31/2026, 2:25:48 PM