Skip to content

[CI] Relax sharded-sampling divergence bound on ROCm - #57369

Open
khluu wants to merge 1 commit into
vllm-project:mainfrom
khluu:fix/sharded-sampling-rocm-tolerance
Open

khluu wants to merge 1 commit into
vllm-project:mainfrom
khluu:fix/sharded-sampling-rocm-tolerance

Conversation

@khluu

@khluu khluu commented Sep 17, 2026

Copy link
Copy Markdown
Member

Purpose

tests/v1/e2e/general/test_sharded_sampling.py::test_sharded_sampling_outputs_match asserts that batch-sharded sampling matches the replicated fallback 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 (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 8 on ROCm only; CUDA keeps the tight bound of 3. 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, and prompts diverged; no existing PR addresses this flake.

Test plan / commands run

  • Flake evidence: analyzed the public Buildkite ci pipeline's last 200 builds via the /data/jobs endpoint; 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 run passes (ruff, mypy, etc.) on the changed file.
  • This is a numerical-tolerance change to a distributed GPU test; I could not run the full 2-GPU test locally (no multi-GPU box). The ROCm path is exercised by the :amd: (MI300) Distributed DP Basic CI 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

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

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

khluu commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

Tracks the test-code portion of the broader flakiness analysis in #57372.

@khluu khluu added the ci-failure Issue about an unexpected test failure in CI label Sep 17, 2026
@khluu

khluu commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

/ci run

@github-actions

Copy link
Copy Markdown

❌ This PR is 72 commits behind upstream main. Your branch must contain every commit currently on upstream main. No new CI build was started. Merge or rebase onto the latest main, then rerun /ci run. To test this branch at your own risk, use /ci run --allow-stale.

@mergify

mergify Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @khluu.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-failure Issue about an unexpected test failure in CI needs-rebase rocm Related to AMD ROCm

Projects

Status: Todo
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant