Repository navigation
Conversation
test_sharded_sampling_outputs_match asserts that batch-sharded sampling matches replicated sampling up to near-tie boot-state noise, allowing at most MAX_DIVERGENT_PROMPTS=3 of 16 prompts to diverge. That bound was tuned on CUDA (<= 1 divergent prompt per boot). On ROCm/MI300 the engine boots land in noisier kernel/collective states and the test flakes at 4-7 divergent prompts (observed across 11 recent CI builds of ":amd: (MI300) Distributed DP Basic"), well above the CUDA bound but still far below the near-total divergence a real request misrouting bug produces. Raise the bound to 8 on ROCm only; CUDA keeps the tight bound of 3. Co-authored-by: Kimi Code <noreply@moonshot.cn> Signed-off-by: Kevin Luu <khluu000@gmail.com> Signed-off-by: khluu <khluu000@gmail.com>
khluu
force-pushed
the
fix/sharded-sampling-rocm-tolerance
branch
from
September 17, 2026 11:36
bbdaa04 to
7b98dc2
Compare
Member
Author
|
Tracks the test-code portion of the broader flakiness analysis in #57372. |
Member
Author
|
/ci run |
|
❌ This PR is 72 commits behind upstream |
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This branch has not been 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.
Purpose
tests/v1/e2e/general/test_sharded_sampling.py::test_sharded_sampling_outputs_matchasserts that batch-sharded sampling matches the replicated fallback up to near-tie boot-state noise, allowing at mostMAX_DIVERGENT_PROMPTS = 3of 16 prompts to diverge. That bound was tuned on CUDA (measured ≤ 1 divergent prompt per engine boot).On ROCm/MI300 the engine boots land in noisier kernel/collective states, and the test flakes at 4–7 divergent prompts — above the CUDA bound but still far below the near-total divergence a real request-misrouting bug produces. In a scan of the last 200 CI builds, this single test accounted for 11 flaky failures, all on
:amd: (MI300) Distributed DP Basic, with divergence of 4/16, 5/16, 6/16, and 7/16.This PR raises the divergence bound to
8on ROCm only; CUDA keeps the tight bound of3. A genuine sharding bug (rows routed to the wrong request, misaligned gathers) still fails, since it diverges on nearly every prompt.Why this is not a duplicate
Checked open PRs/issues for
sharded_sampling,test_sharded_sampling, andprompts diverged; no existing PR addresses this flake.Test plan / commands run
cipipeline's last 200 builds via the/data/jobsendpoint; extracted 240 "failed-then-passed-on-retry" jobs and read each failing attempt's log. 11 were this test, all AMD MI300, divergence 4–7/16 (data and method in the linked tracking issue).pre-commit runpasses (ruff, mypy, etc.) on the changed file.:amd: (MI300) Distributed DP BasicCI job.AI assistance
This change was developed with AI assistance (Kimi Code), including the CI log analysis that identified the flake.
🤖 Generated with AI assistance