Skip to content

Studio ROCm: ship the gfx1151 hipBLASLt GEMM table for the Windows ROCm 7.14 build - #18838

Merged
danielhanchen merged 1 commit into
mainfrom
studio-rocm-gfx1151-gemm-table-win
Nov 22, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-rocm-gfx1151-gemm-table-win

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Studio ships one hipBLASLt GEMM table for gfx1151 (rocm_gemm_tables/gfx1151_torch2.11.0_hip713_...csv, #17299). TunableOp only reads a table whose validators match the running build exactly, and that table was measured on the Linux build (torch 2.11.0+rocm7.13.0, hipBLASLt 100300-02d4f738fc). The Windows installer pins torch 2.11.0+rocm7.14.0 from AMD's multi-arch index (HIP 714, hipBLASLt 100401-cd957402), so on Windows the table never matched and every denoiser GEMM ran on hipBLASLt's default pick.

Change

Adds gfx1151_torch2.11.0_hip714_qwenimage21_flux3klein_1024.csv: the same Qwen-Image-2.1 and FLUX.3 klein 1024x1024 shapes as the Linux table, tuned on a Windows gfx1151 runner with Studio's own Windows environment. There is no code change. The loader already picks a table only on an exact validator match, so Linux and every other build keep reading only their own table.

Per GEMM on the Windows runner (default pick vs the table's pick, median of 30 timed calls):

shape (m x n x k) default ms table ms speedup
24576 x 4096 x 4096 (FLUX.3 klein) 35.88 28.20 1.27x
4096 x 4096 x 12288 (FLUX.3 klein) 23.10 16.91 1.37x
12288 x 4096 x 4096 (FLUX.3 klein) 18.46 14.21 1.30x
4096 x 4096 x 4096 (FLUX.3 klein) 6.55 5.11 1.28x
3072 x 4096 x 9216 (Qwen-Image-2.1) 9.58 7.92 1.21x
18432 x 4096 x 3072 (Qwen-Image-2.1) 17.64 17.12 1.03x
3072 x 4096 x 3072 (Qwen-Image-2.1) 3.05 2.87 1.06x

The small shapes (modulation, text stream) gain 1.35-2.56x. One shape (128 x 4096 x 3072) was slower with the tuned pick (0.73x), so it is left out and keeps the default. The largest difference between the tuned and default outputs is 3.8e-3 to 7.5e-3 of the output range, which is bf16 summation order.

End to end on Windows (same job, main vs this branch): measured on one Windows gfx1151 runner, main first then this branch in the same job, 1024x1024, 3 renders each (run 44978757641):

model main s/step this branch s/step speedup main s/image this branch s/image LPIPS branch vs main peak allocated GiB main / branch
FLUX.3 klein bf16 1.667-1.675 1.554-1.561 1.07x 27.9-28.0 26.1-26.5 0.0025 24.01 / 24.08
Qwen-Image-2.1 bf16 3.128-3.222 2.631-2.666 1.19x 81.3-83.1 69.7-70.5 0.0011-0.0021 39.36 / 39.43

Main's first Qwen-Image render (5.57 s/step, 146.8 s, a cold start) is left out of its range. For scale, two main renders of Qwen-Image differ from each other by LPIPS 0.0015. Device memory is 48.0 GiB on main and 48.1 GiB here.

Tests

tests/test_diffusion_rocm_tunableop.py::test_windows_and_linux_gfx1151_builds_each_get_their_own_table: a host with the Windows validators selects only the new table, and a host with the Linux validators selects only the Linux one. Fails on main (no Windows table), passes here. The existing shipped-table tests (full validators, four-column rows, package data glob) cover the new file too. tests/test_diffusion_rocm_tunableop.py: 21 passed.

Not proven here

  • The table covers 1024x1024 Qwen-Image-2.1 and FLUX.3 klein shapes only, plus the text-stream shapes for an 80-token prompt. Other resolutions, other prompt lengths and the other families (Z-Image, Wan) keep the default pick, as on Linux.
  • Measured on one Windows gfx1151 box. Other RDNA cards on Windows have a different arch and never read this table.
  • A future Windows torch or ROCm bump changes the validators and the table silently stops applying. It needs re-tuning with each pin change, as the Linux table does.

…Cm 7.14 build

Windows Studio installs torch 2.11.0+rocm7.14.0 from the multi-arch index, whose
hipBLASLt (100401-cd957402) differs from the Linux gfx1151 build the existing table
was measured on, so the table never matched there and every DiT GEMM ran on
hipBLASLt's default pick. Measured on a Windows gfx1151 runner: 1.03-1.37x on the
large Qwen-Image-2.1 / FLUX.3 klein 1024^2 shapes, up to 2.5x on the small ones.
Rows where the tuned pick was not faster are left out (default pick kept).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T04:53:53.335567Z d9c066c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: d9c066cc74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 9aff5f0 into main Nov 22, 2026
@danielhanchen
danielhanchen deleted the studio-rocm-gfx1151-gemm-table-win branch November 22, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant