Repository navigation
ci(windows): target gfx11-7-generic for gfx117x and fix the WMMA conv there - #1329
Merged
Merged
Conversation
|
Thanks for opening a PR! This project follows LLVM's incremental-development and AI-tool-use Before requesting review, please check that:
Reviewers are assigned through |
L2 Accuracy Results (EP vs CPU)
Threshold: 0.01 | Run: 8143 - Commit: |
Binary sizesBaseline: run 40994390384 -
MorphiZen EP Performance Results
EPContext Export Performance
EPContext Import Performance
OGA Benchmark Results
OGA Wheel Smoke (Python benchmark_e2e.py)
VLM Benchmark Results
TTFT / TPS vs mainBaseline: run 40994390384 -
Run: 8143 - Commit: |
Kernel Unit Test Results
Leaves: 16 (0 failed) | Cases: 289 (0 failed) Mode: lookup | Coverage: 1 | Run: 8143 - Commit: |
2 tasks
zz002
marked this pull request as ready for review
October 28, 2026 07:21
zz002
requested review from
CaymanYang,
amd-bqiao,
amd-mingw,
asparkhi,
edelaye,
fhanuman,
qianglin-amd,
sambanerxilinxamd and
wcy123
as code owners
October 28, 2026 07:21
Collaborator
Author
|
9 of 12 tasks
Co-Authored-By: Copilot <copilot@github.com>
Point therock_windows at rocm-dist-windows-gfx115x-gfx117x-7.16.0-hipblaslt-gfx117x-trimmed (v0.5.2 asset, built by zz002#7). It adds bin\hipblaslt\library\gfx1171, trimmed to the same HHS/HSS stems as gfx1170; without it hipBLASLt finds no Tensile library on gfx1171. Co-Authored-By: Copilot <copilot@github.com>
gfx117x is numbered in the gfx11 family but implements only the gfx12-style WMMA encoding (see hip_arch_compat.h), so __builtin_amdgcn_wmma_f32_16x16x16_f16_w32 does not exist for gfx11-7-generic. conv_kernel.hip called that builtin directly and fell back to __builtin_trap() without it, so every WMMA conv kernel in custom_kernels_gfx11-7-generic.dll compiled to s_trap and no v_wmma. Every fp16 Conv reaches those kernels, and on Windows the trap hangs the wave until the driver resets the GPU (TDR). gemma3's vision encoder fails this way on gfx1171, with hip_transpose_2d_tiled reporting the first error. Route conv_wmma_kernel and conv_window_kernel through the hip_arch_compat.h helpers, as gemm_wmma_kernel.hip already does: the fragment width, the per-lane K offset, the accumulator row and the builtin follow the target. gfx11 keeps its encoding (K offset 0, row e*2+pair), so its WMMA and memory instructions are unchanged. Tested on gfx1171 (Radeon 940M) with the v0.5.2 SDK: fp16 convs and the gemma3 vision encoder match the CPU EP (relL2 <= 5e-3), the gemma3 VLM benchmark passes with 1100 hipBLASLt calls and no TDR, and the kernel unit tests pass. Co-authored-by: Cursor <cursoragent@cursor.com>
The conv fragment-layout comments still described the gfx11 encoding only (K replicated across lane halves, accumulator row e*2+pair). Point them at loadWmmaFrag / hipdnn_wmma_acc_row instead, and drop the trap comment's restatement of hip_arch_compat.h. Co-Authored-By: Copilot <copilot@github.com>
zz002
force-pushed
the
ci/gfx11-7-generic-probe
branch
from
October 28, 2026 09:51
e7deb5c to
83bad03
Compare
A DLL with no same-name entry in main's baseline was compared against 0, so renaming or adding a kernel DLL failed the gate on its full size. List it as "new" instead; the next PR after it lands on main compares as usual. Co-Authored-By: Copilot <copilot@github.com>
amd-mingw
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Build the gfx117x custom kernels for
gfx11-7-generic, so one DLL covers gfx1170 / gfx1171 / gfx1172. Switch to an SDK that ships gfx1171 hipBLASLt data, and fix the fp16 WMMA conv, which compiled to a trap on gfx117x.Related issue or design
None
Why
a2529029) definesgfx11-7-generic, so one generic target covers the whole gfx117x family.hipblaslt\library\gfx1171, so hipBLASLt cannot find its Tensile library on gfx1171.conv_kernel.hipcalled the gfx11 builtin directly, which falls back to__builtin_trap()on gfx117x, so every fp16 WMMA conv faulted on the GPU. This is what broke the gemma3 vision encoder on gfx1171.What
HIP_ARCHITECTURES:gfx11-generic;gfx1170->gfx11-generic;gfx11-7-generic. The four generic-target tables (genericTargetFor(),kGenericTargets,_lut_arch_members(),_GENERIC_MEMBERS) map gfx1170 / gfx1171 / gfx1172 togfx11-7-generic.cmake/deps.txt: SDK -> v0.5.2rocm-dist-windows-gfx115x-gfx117x-7.16.0-hipblaslt-gfx117x-trimmed, which adds gfx1171 hipBLASLt data; gfx1170 / gfx1171 keep the same five fp16 Tensile stems (built by ci(windows): build gfx1171 in the SDK selfbuild zz002/hip-ep#7).conv_kernel.hip:conv_wmma_kernelandconv_window_kerneluse the WMMA helpers fromhip_arch_compat.h(fragment width, K offset, accumulator row, builtin), asgemm_wmma_kernel.hipdoes. The gfx11 encoding and memory access are unchanged.Test plan
custom_kernels_gfx11-7-generic.dllandkernel-tests/gfx11-7-generic/are stagedbin\hipblaslt\library\gfx1171Notes for reviewers
The DLL size gate reports
custom_kernels_gfx11-7-generic.dll+5.58 MB FAIL because it compares by file name and main has no file by that name, so the baseline counts as 0. The DLL replaces main'scustom_kernels_gfx1170.dll;hipgpu.dllandcustom_kernels_gfx11-generic.dllare unchanged (Δ 0.00).Checklist