Repository navigation
build(hip): opt-in -Dhip-relax-branches for gfx1100 under clang 21 - #1542
Merged
Merged
Conversation
Ubuntu's clang 21 hipcc leaves a branch of affine_dot2_stream_relu2_pair<Dot, 6, 1, 8> past simm16 on gfx1100. -Dhip-relax-branches=true adds -mllvm -amdgpu-s-branch-bits=15 to the gfx1100 kernel code objects; it is off by default, so every target's default build is unchanged. Known issue noted (ashhart#1521).
ashhart
force-pushed
the
fix/hip-relax-branches
branch
from
October 29, 2026 12:54
79da622 to
5ec4c37
Compare
Owner
|
Thanks @AbrahamCete, landed as 12c1184. With the option off, every HIP compile command is the same as main's, so default builds are unchanged; |
8 tasks done
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.
What this changes
Adds an opt-in build option,
-Dhip-relax-branches=true, that passes-mllvm -amdgpu-s-branch-bits=15to the gfx1100 kernel code objects, so Ubuntu's clang 21 hipcc can buildaffine_dot2_stream_relu2_pair<Dot, 6, 1, 8>for gfx1100. It is off by default, declared on every target, and noted indocs/known-issues.md. Closes #1521.The flag goes in
compile()inzig/build/hip.zig, which builds every kernel group and the contract's code objects. The two probe--gencocompiles (runtime_tests.hip,affine.hip) do not include the stream tiles, so they are unchanged.Receipt
main1b9a987, Ubuntu 26.04, Zig 0.17.0, Ryzen AI Max+ 395 (gfx1151). Compilers: Ubuntu clang 21.1.8 hipcc, and ROCm 7.13 (AMD clang 23) from TheRock.main's, built at the same tree path (clang embeds a path-derived id, so two checkouts at different paths differ even on the same commit):hip-kernel-contract-objects: all 48 objects (11 groups and the controls for gfx1030, gfx1100, gfx1151, gfx1201) identical.mainand on this branch with the same "branch size exceeds simm16".python3 -m unittest discover -s tools/zig -p build_options_test.py5 passed, 0 failed, 0 skipped;tools/zig/lean_check.py426 problems on bothmainand this branch (none new);zig fmt --check zig/build/hip.zigclean.hip-kernel-test,hip-affine-testand a served A/B on gfx1100 with the option on. I have no gfx1100 card, which is why the option is off by default.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Default code objects unchanged.)SUMMARYline is in the receipt. (No kernel changes.)