Repository navigation
Two-GPU decode RoPE test: check the copy bitwise and the rounding at 2 ulp - #14752
Merged
Merged
Conversation
The copy-ordering test compared fused output to the unfused ops at atol 0.05, but fused rounds once and unfused several times, so valid bf16 results differ by 0.0625 at |x| >= 8. Compare the copy bitwise to the same kernel run with its own device current, and fused vs unfused at the 2 ulp bound used elsewhere.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
danielhanchen
added a commit
that referenced
this pull request
Oct 23, 2026
Conflict in tests/test_decode_fused_rope.py: main (#14752) replaced the atol = 0.05 asserts in test_decode_rope_on_another_device_orders_with_the_copy with a bitwise check against a same-device rotation plus a 2 ulp bound vs the unfused ops. Kept main's assertions verbatim and appended this branch's two new tests (64-bit indexing selection on meta tensors, and the decode RoPE reference check past int32 cache offsets) after that test. [skip ci]
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.
Follow-up to #14611.
test_decode_rope_on_another_device_orders_with_the_copycompared the fused decode RoPE output with the unfused ops atatol = 0.05. The fused kernel rounds once and the unfused ops round several times, so valid bf16 results differ by one ulp, which is 0.0625 for |x| >= 8. With the test's3 * randninputs that happens on most seeds, so the test fails on a two-GPU runner without anything being wrong.Change
test_decode_rope_inplace_matches_unfusedin the same file.Validation
atol = 0.05check fails 367 of 400, the 2 ulp bound holds on all 400, and the fused kernel is bitwise deterministic run to run.