← Back to Pull requests

Add a v1 multi-rank CPU suite (manual dispatch first) #8926

Closed
unknown closed this pull request without merging on Oct 29, 2026 01:06 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 08:17 UTC
Author

What

Adds cpu-torch-latest-v1-multirank, a CPU suite for the tests/unit/v1 multi-rank tests — the one gap left between the existing CPU workflows:

| Workflow | Covers |
|---|---|
| cpu-torch-latest | all of unit/ at world_size == 1 (the device gate skips higher ranks) |
| cpu-torch-multi-latest (nightly) | multi-rank for the non-v1 half + the sequential marker |
| cpu-torch-latest-v1-multirank (this PR) | v1 multi-rank (world_size 2-4) |

Mechanically it is the same recipe the nightly suite uses: LOCAL_SIZE=4 lets the per-device gate admit the multi-rank tests, and DS_MULTIRANK_ONLY=1 deselects everything else, so the job spends its time on v1 multi-rank tests only.

Selection

Test selection reuses the existing Modal diff-based picker (ci/tests_fetcher.py): the new WORKFLOWS entry scopes the suite to tests/unit/v1, so a PR only runs the v1 files it could affect. The collect-tests job writes ci/.test_selection/test_list.txt and the test job consumes it; mode=none skips the run entirely. No test lists are maintained by hand.

Rollout: manual dispatch first

The trigger is workflow_dispatch only, deliberately. This suite has never run in CI, and putting an unvalidated ~1 h suite in front of every pull request (or into branch protection) before it has a green run would block PRs. Once it is green across a few real PRs, pull_request: goes back into the on: block and the check can be registered.

Harness changes this suite needs (included here)

The v1 multi-rank tests rely on two fixes that used to live on the work-in-progress #8381 branch; they are part of this PR so the first run can be green:

  • tests/unit/v1/zero/test_zero_autocast.py: the DDP device_ids capability probe — without it, all 24 DDP autocast variants fail on CPU with ValueError: DistributedDataParallel device_ids and output_device arguments .... The fp16 parity variants are skipped when the accelerator reports no fp16 support (is_fp16_supported() false) rather than widening the tolerance, so no assertion is relaxed.

  • tests/unit/common.py: shm-segment key isolation/cleanup, JIT warm-up with stale-baton cleanup, per-rank faulthandler, and master-port uniquification — without them, concurrent pools share shm segments and can corrupt data or wedge.
  • Verified on CPU, 2 ranks: bf16 ZeRO-3 passes, fp16 variants skip when fp16 is unavailable, and no /dev/shm segments are left behind.

    Validation

  • python3 ci/test_tests_fetcher.py: 27/27 (adds a registry test for the new WORKFLOWS entry)

  • ci/tests_fetcher.py --workflow cpu-torch-latest-v1-multirank: mode=all (-> tests/unit/v1) with no base, mode=none with no impacted tests; ci/torch_latest.py validate-selection passes

  • Both files pass pre-commit (yapf, flake8, yaml, license)
  • AI assistance

    Prepared with AI assistance (DeepSeek Harness agent) under human review; the submitter has read every changed line.

    Signed-off-by: Ma, Guokai <guokai.ma@intel.com>

    Diff: 377 lines (+282 / -95) across 4 files Reviewer: delock Review duration: 2448m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 377 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.355
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8926"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.9% (MEDIUM) · Higher = larger blast radius
    42.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%