Repository navigation
Fit the reference model's ring buffer to its 32-token prefill in the Muse Glimmer export test - #25038
Open
shoumikhin wants to merge 1 commit into
Open
shoumikhin wants to merge 1 commit into
shoumikhin wants to merge 1 commit into
Conversation
…Muse Glimmer export test #24979 sized the sliding-window ring buffer from the largest prefill chunk, which defaults to the window size. In test_cuda_sequence_export_inputs the window is 16, so the ring now has 31 slots, but the reference model takes all 32 tokens in one write. The write wraps around the ring and the reference logits come out wrong, so the test fails with a max difference of about 0.33 against the exported program (limit 0.05). This turned unittest / linux, unittest-editable / linux and unittest-release / linux red on main. Set the reference model's max prefill chunk to 32 so its ring holds the whole write. The exported program is unchanged. Checked by running the same model setup on CPU: the one-shot 32-token reference now matches the same tokens fed as two 16-token chunks exactly, and without the change it differs by 0.33.
shoumikhin
requested review from
Gasoonjia
and
a balanced review from Copilot
November 13, 2026 17:01
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25038
Note: Links to docs will display an error until the docs builds have been completed. ❌ You can merge normally! (2 Unrelated Failures), 1 Unclassified FailureAs of commit b640c0d with merge base 311d96d ( UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This branch was previously deployed
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.
#24979 sized the sliding-window ring buffer from the largest prefill chunk, which defaults to the window size. In
test_cuda_sequence_export_inputsthe window is 16, so the ring now has 31 slots. But the reference model takes all 32 tokens in one write. The write wraps around the ring, so the reference logits come out wrong and the test fails with a max difference of about 0.33 (the limit is 0.05). This turnedunittest / linux,unittest-editable / linuxandunittest-release / linuxred on main.This sets the reference model's max prefill chunk to 32, so its ring holds the whole write. The exported program is unchanged.
Tested: ran the same model setup on CPU. The one-shot 32-token reference now matches the same tokens fed as two 16-token chunks exactly. Without the change it differs by 0.3335, the same number CI reports.