Repository navigation
Revert "Revert "[AMD][ROCm] Keep cos_sin_cache fp32 on HIP for fused QSA indexer kernel (#41282)"" - #42558
Merged
BBuf merged 2 commits intoOct 5, 2026
Conversation
…QSA indexer kernel (sgl-project#41282)"" This reverts commit 456d533.
michaelzhang-ai
marked this pull request as ready for review
October 5, 2026 07:55
michaelzhang-ai
requested review from
Fridge003,
Ying1123,
ispobock and
merrymercy
as code owners
October 5, 2026 07:55
michaelzhang-ai
requested review from
BBuf,
Edwardf0t1,
HaiShaw and
ch-wan
as code owners
October 5, 2026 07:55
2 tasks done
This was referenced Oct 5, 2026
4 of 5 tasks
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.
Motivation
#42541 reverted #41282 because the HIP
sgl_kernel.rotary_embeddingfallback could not read an fp32cos_sin_cache. #42494 had already fixed that kernel to read an fp32 cache, about 12 hours before #42541 merged, and it movedtest_rope_rocm.pyinto AMD stage A with a check that the HIP cache stays fp32.With #41282 reverted, HIP casts the cache to the query dtype again, so that check fails
stage-a-test-1-gpu-small-amdand every AMD stage B/C job is skipped:#42541's own stage A run already failed this way (job). Since it merged, 18 of the 19 completed stage A jobs failed the same way, e.g. run 37272668001 and run 37275678823. The one pass is a stacked PR whose base branch does not contain #42541.
With #41282 and #42494 both on main, stage A passed 9/9, including Llama, EAGLE3 and
test_rope_rocm.py: #42494's own run (job) and later PRs such as run 37254377497 and run 37265045192, the last one 12 minutes before #42541 merged.Modifications
git revert 456d533e(#42541).base.pyandmrope.pygo back byte-for-byte to their state after #41282; the patch is identical to f6fcda8, and nothing else has touched either file since.This brings back the fp32
cos_sin_cacheon HIP thattest_rope_rocm.pychecks for, and with it the fused QSA indexer prep on HIP (_use_fused_preprequires an fp32 cache; benchmarks in #41282).Checklist
stage-a-test-1-gpu-small-amdpassesCI States
Latest PR Test (Base): ⏳ Run #37280502385
Latest PR Test (Extra): ❌ Run #37280518422
Latest PR Test (AMD ROCm 10): ❌ Run #37280502098