Skip to content

Run the real-geometry rows check in two halves on separate GPU shards - #1872

Merged
davidtai merged 3 commits into
devfrom
test/split-qwen-tp-rows-gpu
Nov 7, 2026
Merged

davidtai merged 3 commits into
devfrom
test/split-qwen-tp-rows-gpu

Conversation

@davidtai

@davidtai davidtai commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Cluster GPU Tests shard 1 (non-blocking) runs one test, rowsEqualTheirSoloStepsAndWindowPositionsAtRealWidths (QWEN_TP_REAL_GEOMETRY_GPU). The test took 1,098 s in run 42268059756, and the job took 18.4 to 20.8 min (median 19.1) in the 14 full CI (dev) runs of 2026-11-06. The job ends at 21 to 24 min of every run, after the Provider Tests gate, so it sets the run's wall time. The source is the measurement of PR 1868.

All of the time is in QwenTensorParallelRowsCheck.run. The check has two halves that share no reference:

Half What it checks Reference Prompt tokens prefilled
rows 8 rows of 100 to 4,090 tokens: P1 on a one- and an eight-lane host, PB8 with joins and leaves, PB2, PB4, the observed PB4 cohort, the verify windows alone and in a cohort the rows alone on a one-lane host (soloOne) about 61k
segments 8 rows of 4,000 to 4,600 tokens, together across KV segments the long rows alone (longSolo) about 69k

The resource sampler shows the process at about 1.6 busy vCPUs for the whole test. The prefill and the cross-rank sums both scale with the prompt tokens, so each half takes about half of the time.

What changes

  1. QwenTensorParallelRowsCheck.run takes parts (Part.rows, Part.segments; the default is both). With both parts the check runs the same steps in the same order as before: the rows plain steps, then the segments, then the windows. darkbloom-cluster-tp-check qwen-rows run calls it with the default, so the tool runs the whole check as before.
  2. Each half keeps its refusals. The rows half refuses non-finite logits, reference logits that are not all distinct, and a blind comparison. The segments half refuses non-finite logits and rows within one KV segment. The refusal is still checked after both ranks' last collective.
  3. Two tests. rowsEqualTheirSoloStepsAndWindowPositionsAtRealWidths runs the rows half. The new rowsAcrossKVSegmentsEqualTheirSoloStepsAtRealWidths runs the segments half. Each assembles the two ranks, checks the decode census (aqv=24 partial=8 mlx=0) and asserts that both reports pass, as the one test did.
  4. A third GPU shard (scripts/cluster-test-plan.py, provider-tests.yml). Shard 1 runs the rows half alone. The new shard 3 runs the segments half alone (qwen-tp-real-geometry-gpu-segments). Shard 2 does not change. All three shards run on blacksmith-12vcpu-macos-27 and are not routed, so the route request and the DARKBLOOM_MACOS_LANES cap do not change.
  5. Self-test. test-cluster-test-plan.py checks that each half is its own non-blocking selection, alone on a shard, on two different shards. The existing matrix check makes the workflow run every planned GPU shard. The audit needs no change: it already requires each gated test in exactly one selection, so it covers the new test.
  6. Docs and changelog. docs/developer/test.md, docs/developer/build.md, docs/architecture/inference.md, and changelog.d/ci-split-qwen-tp-rows-gpu.md.

Every row, width, step and window position checked before is still checked, with the same assertions. Nothing is sampled.

Before and after

Before: the 14 full CI (dev) runs of 2026-11-06 (42201769655 … 42281198827), medians. After: this PR's runs (below).

Before After (run 42307447087, head 887e3c3)
Slowest Cluster GPU Tests job 19.1 min (shard 1) 10.1 min (shard 3; shard 1 9.6, shard 2 9.3)
Real-geometry test time 1,098 s, one test (run 42268059756) 522 s (rows) and 561 s (segments), on separate Macs
Last Cluster GPU Tests job done 22.3 min into the run 13.1 min
Run wall time (run start to last job) 22.2 min 21.5 min
macOS jobs per run (cluster and provider selected) 12 13 (one more Blacksmith GPU shard)

The digests compared are the same: 200 (rows) + 136 (segments) = 336 a rank, as the one test reported. No digest differs, and both halves passed their refusals (reserved=71106560, more than one KV segment).

The run's wall time is now set by the blocking path, not by a GPU job. In this run Provider Unit Tests shard 1 ended at 20.1 min and the Provider Tests gate at 21.5 min (1.3 min of plan checks). PR 1868 moves those plan checks out of the gate and splits Cluster Runtime Tests shard 2 (19.0 min here). With both PRs, the run ends when the gate does (about 18.7 min in PR 1868's runs).

Flow

Before:

  • GPU shard 1: assemble both ranks → run: rows plain steps → segments → windows (18 to 19 min).
  • GPU shard 2: the other non-blocking selections.

After:

  • GPU shard 1: assemble both ranks → run(parts: [.rows]): rows plain steps → windows.
  • GPU shard 3: assemble both ranks → run(parts: [.segments]): segments.
  • GPU shard 2: no change.

Validation

No builds or tests ran on the laptop. Run 42307447087 (head 887e3c3): every job succeeded. CI ran the plan self-tests and the audit, and both halves of the check passed on the GPU shards.

Run 42318853015 (head 1435b6c, after the merge of dev and the refactor pass): every job succeeded. The run took 23.5 min, and the Provider Tests gate finished 23.4 min into the run. The slowest GPU job was Cluster GPU Tests shard 3 at 10.1 min (shard 1 9.5, shard 2 8.2). The slowest blocking job was Provider Unit Tests shard 1 at 19.0 min (00:36:49 to 00:55:50); it started 4.3 min into the run and set the wall time. The slowest Cluster Runtime Tests shard took 13.4 min (shard 1). Both halves passed: rows compared=200 differing=0 (528 s), segments compared=136 reserved=71106560 differing=0 (562 s), on both ranks.

Non-green checks, none caused by this change:

  • Cluster GPU Tests shard 2 (non-blocking, the job succeeds): qwen-tp-mtp-gpu-wide-kernel, qwen-tp-aqv-gpu-fused-kernels, qwen-tp-batch-gpu-paged-transient, glm53-depth-invariance-widths, glm53-window-width-census and qwen-tp-wide-bench fail on the Blacksmith GPU, as they do on dev (the reason this lane is non-blocking). This PR does not change shard 2.
  • Vercel d-inference and d-inference-console-ui-dev: the deployments also fail on PRs 1862, 1868 and 1869.

Limitations:

  • This PR changes provider-tests.yml, so its runs also select the MiMo audio gate (as PR 1868's did). That can make Provider Unit Tests shard 2 slower in this PR's runs than in an ordinary run.
  • PR 1868 merged first. Merge b796cc3 keeps its 5 Cluster Runtime Tests shards, their shared lanes and the Check the CI plans job, and this PR's GPU shard 3. A cluster change now runs 12 Macs (5 runtime, 2 focused, 3 GPU, the build and the release build checks). The routed asks stay 12 with job sizes on and 9 with them off, because the GPU shards are not routed.
  • Refactor pass (commit 1435b6c, run on this PR's own changes by the agent the coordinating session sent for the merge of dev (b796cc3), not by the session that wrote the change; no separate reviewer agent checked it): two behavior-preserving changes. QwenTensorParallelRowsCheck.run now says why the rows half's verify windows come after the segments half (each half's steps keep their place, so the default runs the same steps in the same order). Each real-geometry test now also checks its half's digest count on both ranks (200 rows, 136 segments, 336 a rank in total), so a dropped case fails instead of passing on compared > 0. No other change was warranted: parts defaults to both halves, each half keeps its refusals, and both tests keep the census and per-rank pass checks.
  • AGENTS.md asks for Mermaid diagrams; this PR uses the text flow above instead, as requested for this change.

🤖 Generated with Claude Code

Cluster GPU Tests shard 1 ran one test, rowsEqualTheirSoloStepsAndWindowPositionsAtRealWidths,
for 18 to 19 min, after the gate, so it set every run's wall time.

QwenTensorParallelRowsCheck.run takes the halves to run (parts, default both,
in the same order as before). The rows half keeps P1 on one- and eight-lane
hosts, PB8 with joins and leaves, PB2, PB4, the observed cohort and the
verify windows; the segments half keeps the long rows across KV segments.
Each half compares only against its own solo runs and keeps its refusals.
The test suite runs each half as a test; the plan runs them alone on
Cluster GPU Tests shards 1 and 3 (new); shard 2 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Error Error Nov 7, 2026 12:33am UTC
d-inference-console-ui-dev Error Error Nov 7, 2026 12:33am UTC
d-inference-landing Ready Ready Preview Nov 7, 2026 12:33am UTC
darkbloom-status Ready Ready Preview Nov 7, 2026 12:33am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 7, 2026 12:33am UTC

Request Review

davidtai and others added 2 commits November 6, 2026 18:31
Keeps dev's 5 Cluster Runtime Tests shards, their shared lanes and the
Check the CI plans job (#1868), and this branch's Cluster GPU Tests
shard 3 (the segments half of the real-geometry rows check) with the
rows half alone on shard 1. A cluster change now runs 12 Macs; the
routed asks stay 12 with sizes on and 9 with them off, since the GPU
shards are not routed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QwenTensorParallelRowsCheck.run says why the rows half's verify windows
come after the segments half: each half's steps keep their place, so the
default runs the whole check's steps in the same order. Each real-geometry
test now checks that its half compared every digest of the half on both
ranks (200 rows, 136 segments, 336 a rank in total), so a dropped case
fails instead of passing on compared > 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

2 failed and 3 active deployments
Preview – eigen-homepages-darkbloom — 1435b6c3 Deployed Nov 7, 2026 by vercel[bot]
Preview – d-inference-landing — 1435b6c3 Deployed Nov 7, 2026 by vercel[bot]
Preview – darkbloom-status — 1435b6c3 Deployed Nov 7, 2026 by vercel[bot]
Preview – d-inference — 1435b6c3 Deployed Nov 7, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 1435b6c3 Deployed Nov 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant