Repository navigation
Reduce unnecessary CI work for documentation changes and consolidate agent instructions in AGENTS.md - #8794
Merged
Conversation
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
- Defer DCO enforcement to CI instead of code reviews. - Retain signoff guidance for commit creation. - Remove duplicate CLAUDE.md and the synchronization note. Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
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. |
delock
approved these changes
Oct 10, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 10, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 10, 2026
banxingmjj
pushed a commit
to openanolis/DeepSpeed
that referenced
this pull request
Oct 10, 2026
## Problem Since deepspeedai#8680 landed, `modal-torch-latest / DeepSpeedAI CI` has failed for every merge-queue entry that runs this test on Modal's L40S runners (deepspeedai#8794, deepspeedai#8701, deepspeedai#8670). Example: [run 38009529440](https://github.com/deepspeedai/DeepSpeed/actions/runs/38009529440/job/114086150257). ``` FAILED tests/unit/v1/autotp/test_autotp_training.py::TestTiedRowParallelOutputHeadTraining::test_training_matches_unsharded_reference[35-3-False-0] FAILED tests/unit/v1/autotp/test_autotp_training.py::TestTiedRowParallelOutputHeadTraining::test_training_matches_unsharded_reference[35-3-True-0] Mismatched elements: 1 / 670 (0.1%) Greatest absolute difference: 1.1173542588949203e-06 at index (1, 1, 45) (up to 1e-06 allowed) ``` deepspeedai#8680's own merge-queue run and the next nightly run both used the AWS fallback, where the test passes, so the failure wasn't caught there. ## Root cause The row-parallel head (`LinearAllreduceWithReplicatedInput`) slices the hidden vector, computes a partial matmul on each rank, and all-reduces the partial logits. The reference is one unsharded fp32 matmul, and the two summation orders round differently. The tied head uses the embedding's N(0,1) weights, so logits reach about 14, where one fp32 ulp is about 1e-6. Logits that are near zero through cancellation can therefore differ by more than `atol=1e-6`. Even the fp32 reference differs from a float64 ground truth by up to 2.2e-6. ## Fix Use torch.testing's default fp32 tolerance (`atol=1e-5`, `rtol=1.3e-6`) for every fp32 `assert_close` in `test_autotp_training.py`. That covers 17 checks, including both row-parallel logits checks, and matches the 19 fp32 checks in the file that already use the default. The half-precision tolerances in `run_tp_layer_fwd_bwd` are unchanged. The default is enough for what these tests check: - The sharding bugs they target (wrong shard offset, missing all-reduce, dropped tied-gradient contribution, tied weights drifting apart) move values by 0.1 to 10. - A simulated precision regression (all-reduce inputs rounded to bf16) still fails every check it failed under the old tolerances. The one exception is the SGD-update check, which can't detect it under either tolerance. - The custom values were tighter than the default only for values below about 1, and looser for larger ones such as the losses. ## Evidence (2x H200) - In a sweep of 40 init seeds, every parametrization of the tied test has seeds that fail the old logits check (worst ratio to the allowed tolerance: 1.19). Under the default, the worst case uses under 30% of the limit. - Changing only the seed to 8199 reproduces the CI failure: `[35-3-False-0]` and `[35-3-True-0]` fail with `1 / 670` mismatched and `1.25e-06 (up to 1e-06 allowed)`. - Every other changed check stays under 3% of the default limit, recorded per call across the 4 affected test classes. ## Testing Hardware: 2x NVIDIA H200, torch 2.12.0+cu130, Python 3.12. - `pytest tests/unit/v1/autotp/test_autotp_training.py -k "TestRowParallelOutputHeadTraining or TestTiedRowParallelOutputHeadTraining"`: 8 passed. - `pytest tests/unit/v1/autotp/test_autotp_training.py -m sequential -k "TestTiedEmbeddingAliasesAndFallback or TestTiedVocabParallelLMHead"`: 30 passed. - Seed-8199 reproduction, which fails before this change: passes with the default logits tolerance. - `pre-commit run --files tests/unit/v1/autotp/test_autotp_training.py`: passed. No L40S is available locally. This PR's merge-queue run selects this test file, so it will check the fix on Modal's L40S runners unless the run falls back to AWS. --------- Signed-off-by: Hongwei Chen <[email protected]> Co-authored-by: Copilot <[email protected]>
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.
Documentation changes should not consume expensive CPU/GPU CI capacity or expand test selection for unrelated code changes. This PR avoids that unnecessary work while preserving coverage and required CI safeguards.
• Share documentation detection across CI gates and the Modal selector:
docs/**,blogs/**, and.mdfiles anywhere. Documentation in mixed PRs doesn't widen GPU test selection.• Skip CPU/GPU suites, Python install smoke, and native-op precompilation for documentation-only PRs and merge-queue entries. Preserve scheduled/manual runs and required status reporting.
• Run the gate from the base revision. Compare PR merge commits against their first parent to avoid counting upstream changes when
pull_request.base.shais stale. Preserve rename/deletion handling and conservative failure fallbacks, with a bounded gate timeout.• Exclude Markdown from the optional MPS and no-torch PR triggers. Run lightweight gate/selector self-tests and README validation independently in the required formatting workflow.
• Update CI documentation and consolidate agent guidance in
AGENTS.md, removing duplicateCLAUDE.mdbecause Claude code now support agents.md.Only active workflows are changed; disabled legacy workflows remain untouched.