[TEST ONLY][DO NOT MERGE] Bump LLVM pin to 739eaa08 to fix gfx1250 entry prologue - #1088
Open
Phil-amd wants to merge 1 commit into
Open
[TEST ONLY][DO NOT MERGE] Bump LLVM pin to 739eaa08 to fix gfx1250 entry prologue#1088Phil-amd wants to merge 1 commit into
Phil-amd wants to merge 1 commit into
Conversation
…try prologue Test-only bump on top of #1051 to move the pin from 941a04e69ee8 (2026-08-09) to 739eaa08d45e (2026-08-18). Not for merge; opened to validate on gfx1250. #1051 pins 941a04e69ee8, which lands in the middle of an upstream sequence that reworks the gfx1250/gfx1251 hardware entrypoint prologue three times. That prologue is inserted by SIInsertWaitcnts for every entry function whenever the subtarget has requires-initial-unclause-vmem, so it affects every kernel: ae98c7d9d386 (#214127, 08-05) global_prefetch_b8 v0, s[0:1] -> v0, null 1109d68feb1b (#215450, 08-11) reverts to a real register pair: s_mov_b64 s[64:65], 0 v_nop global_prefetch_b8 v0, s[64:65] 739eaa08d45e (#216897, 08-18) same sequence, and hoists the REPLAY_MODE s_setreg ahead of it Only the first is an ancestor of 941a04e69ee8, so #1051 picks up the null-saddr form without either of the two commits that walk it back. Upstream undoing a just-merged change twice is the tell that the null form is wrong on hardware, and it matches the report against #1051 on gfx1250: a plain GEMM aborts with HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION and the faulting PC sits on the prologue global_prefetch_b8. With no legal zero base in saddr the prefetch addresses outside the aperture. The instruction is not FlyDSL's. The only global_prefetch emitter in the tree is l2_prefetch_tile in python/flydsl/expr/rocdl/tdm_ops.py, which has no callers, which is why any kernel reproduces it. Moving to 739eaa08d45e takes both follow-ups. gpu::LaunchFuncOp is untouched in 941a04e69ee8..739eaa08d45e, so the FlyToROCDL adaptation from #1051 carries over unchanged, and FlyDSL implements no CallOpInterface op, so the interface verification tightened by #214724 in the same range does not apply. Unverified: the reported disassembly prints the saddr as `off` rather than the `null` the pin should emit, so the deployed LLVM may not be exactly 941a04e69ee8. Confirm the built prologue contains s_mov_b64 s[64:65], 0 on the test machine.
Phil-amd
marked this pull request as ready for review
September 2, 2026 09:07
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.
Problem
#1051 is reported to abort on gfx1250 for any kernel, e.g.
with the faulting PC on the
global_prefetch_b8at the top of the kernel.Root cause
The
global_prefetch_b8is not emitted by FlyDSL. The onlyglobal_prefetchemitter in the tree is
l2_prefetch_tile(
python/flydsl/expr/rocdl/tdm_ops.py), and it has no callers. Theinstruction comes from
SIInsertWaitcnts.cpp, which prepends a hardwareentrypoint prologue to every entry function whose subtarget has
requires-initial-unclause-vmem(gfx1250/gfx1251). That is why any kernelreproduces it, not just this GEMM.
Upstream reworked that prologue three times in three weeks, and
941a04e69ee8(2026-08-09) sits in the middle of the sequence:941a04e6?ae98c7d9d386(#214127)global_prefetch_b8 v0, s[0:1]→v0, null1109d68feb1b(#215450)s_mov_b64 s[64:65], 0+v_nop+v0, s[64:65]739eaa08d45e(#216897)s_setreghoisted ahead of itSo #1051 picks up the
null-saddr form together with neither of the twocommits that walk it back. Upstream reverting a just-merged change twice is
itself the signal that the
nullform is wrong on hardware, and it matches thesymptom: with no legal zero base in
saddr, the prologue prefetch addressesoutside the aperture.
Note #1051's stated motivation is #214885
("Keep TDM counter low"); the commit that bites is a different one in the same
range.
This change
Moves the pin to
739eaa08d45e, which includes both follow-ups.gpu::LaunchFuncOpis untouched in941a04e69ee8..739eaa08d45e, so [FlyToROCDL] Bump LLVM to 941a04e6 and adapt gpu.launch_func lowering #1051'sFlyToROCDL.cppadaptation carries over unchanged.CallOpInterfaceop, so the interface verificationtightened by #214724 in
the same range does not apply.
Validation asked for
Needs a gfx1250 machine — I have no such hardware locally, and everything above
is static analysis of the upstream history, not a reproduction.
s_mov_b64 s[64:65], 0:llvm-objdump -d --mcpu=gfx1250 <kernel>.hsaco | head -20One caveat worth checking while there: the reported disassembly prints the saddr
as
off, not thenullthat941a04e69ee8should emit, so the LLVM deployed onthat machine may not be exactly at the pin. Worth confirming, since it changes
whether the bad window is the whole story.
Disable the JIT disk cache on both sides when comparing
(
FLYDSL_RUNTIME_ENABLE_CACHE=0) — the cache key does not include the LLVMversion, so a stale HSACO can otherwise mask the difference in either direction.