Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/provider-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ jobs:
# shards share one lane with a count of 2: the two Cluster Focused Checks
# shards, Cluster Runtime Tests shards 2 and 3 (test-cluster-2) and shards
# 4 and 5 (test-cluster-3). A lane asks for a job only when the job runs.
# The three Cluster GPU Tests shards are not routed: shard 2 uses 42 GiB,
# more than any signed size, and one lane carries one size for every shard.
# They run on blacksmith-12vcpu-macos-27.
# Cluster GPU Tests shards 1 and 3 have a lane each. Shard 2 has none: it
# uses 42 GiB, more than any signed size, so it runs on
# blacksmith-12vcpu-macos-27 without asking.
#
# Sizes (<vCPUs>x<GiB>) are sent only while DARKBLOOM_JOB_SHAPES is `on`
# (darkbloom-route.yml). A job asks for the smallest signed size (4x16,
Expand All @@ -165,7 +165,8 @@ jobs:
# the Blacksmith fallback). If the approval pins a smaller size, the build
# jobs and Cluster Release Build Checks get that size too. The lanes are in
# the order the DARKBLOOM_MACOS_LANES cap keeps them: the critical-path test
# shards first, then the build jobs and Cluster Release Build Checks.
# shards first, then the build jobs and Cluster Release Build Checks, then
# the non-blocking GPU shards.
route:
needs: [tested, components]
if: ${{ !cancelled() }}
Expand All @@ -183,3 +184,5 @@ jobs:
build-cluster macos_arm64 blacksmith-12vcpu-macos-27 ${{ (needs.components.outputs.cluster == 'true' || (github.event_name == 'push' && needs.tested.outputs.skip == 'true' && needs.components.outputs.changed_cluster == 'true')) && 1 || 0 }} 8x16
build-provider macos_arm64 blacksmith-12vcpu-macos-27 ${{ (needs.components.outputs.provider == 'true' || (github.event_name == 'push' && needs.tested.outputs.skip == 'true' && needs.components.outputs.changed_provider == 'true')) && 1 || 0 }} 12x32
cluster-release-checks macos_arm64 blacksmith-12vcpu-macos-27 ${{ needs.components.outputs.cluster == 'true' && 1 || 0 }} 8x16
test-cluster-gpu-1 macos_arm64 blacksmith-12vcpu-macos-27 ${{ needs.components.outputs.cluster == 'true' && 1 || 0 }} 4x24
test-cluster-gpu-3 macos_arm64 blacksmith-12vcpu-macos-27 ${{ needs.components.outputs.cluster == 'true' && 1 || 0 }} 4x24
8 changes: 4 additions & 4 deletions .github/workflows/provider-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -768,13 +768,13 @@ jobs:
# ones and the benchmarks (scripts/cluster-test-plan.py). They run and
# report whenever the cluster jobs run; a failure does not fail the
# workflow. Shards 1 and 3 each run one half of the real-geometry rows
# check. Shard 2 uses 42 GiB, more than any signed Darkbloom size, so
# every shard runs on Blacksmith without asking the route
# (provider-plan.yml).
# check and read a lane of their own (provider-plan.yml). Shard 2 uses
# 42 GiB, more than any signed Darkbloom size, so it runs on Blacksmith
# without asking the route.
name: Cluster GPU Tests (non-blocking, shard ${{ matrix.shard }})
needs: build-cluster
if: ${{ inputs.cluster == 'true' }}
runs-on: blacksmith-12vcpu-macos-27
runs-on: ${{ matrix.shard == 2 && 'blacksmith-12vcpu-macos-27' || fromJSON(inputs.routes)[format('test-cluster-gpu-{0}', matrix.shard)] }}
timeout-minutes: 60
strategy:
fail-fast: false
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/ci-gpu-shards-darkbloom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### CI: Cluster GPU Tests shards 1 and 3 ask Darkbloom first

- Cluster GPU Tests shards 1 and 3 now ask the Darkbloom plane for a sandbox, each on a lane of its own (`test-cluster-gpu-1`, `test-cluster-gpu-3`; 4x24 while sizes are on: 14.33 and 14.72 GiB used in run 42737118357). Each falls back alone to `blacksmith-12vcpu-macos-27` when the plane does not grant it.
- Shard 2 still runs on `blacksmith-12vcpu-macos-27` without asking: it uses 42 GiB, which no signed size holds.
- A full CI run now asks for 14 macOS jobs instead of 12. The two GPU lanes come last in the lane table, so the `DARKBLOOM_MACOS_LANES` cap drops them first.
39 changes: 21 additions & 18 deletions docs/developer/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,16 +378,16 @@ again; the next failure opens a new one.

A full run takes about 13 minutes and 110 macOS job-minutes: about 31 for the
build jobs, Cluster Release Build Checks and Cluster GPU Tests, and about 79
for the 9 blocking test shards. Every macOS job but Cluster GPU Tests is
routed, and falls back to Blacksmith when the plane grants no Mac.
for the 9 blocking test shards. Every macOS job but Cluster GPU Tests shard 2
is routed, and falls back to Blacksmith when the plane grants no Mac.

### Build Once

Each lane builds its debug test products once, on a large runner, and its
test jobs run them with `swift test --skip-build`. No test job compiles the
provider or the cluster packages. Every job below but `test-cluster-gpu` reads
its runner from the route ([CI Runner Routing](#ci-runner-routing)). Its
fallback is `blacksmith-12vcpu-macos-27`. While job sizes are off, every job
provider or the cluster packages. Every job below reads its runner from the
route ([CI Runner Routing](#ci-runner-routing)), except shard 2 of
`test-cluster-gpu`. Its fallback is `blacksmith-12vcpu-macos-27`. While job sizes are off, every job
asks without a size ([Job sizes](#job-sizes)).

| Job | Runner | Needs | Does |
Expand All @@ -397,7 +397,7 @@ asks without a size ([Job sizes](#job-sizes)).
| `cluster-release-checks` (Cluster Release Build Checks) | routed | - | Compiles the release build of the worker capability and prefill schedule checks, and runs them |
| `test-provider`, shards 1 and 2 | routed | `build-provider` | The provider selections, Prompt Parity, the native gates, the audit and coverage |
| `test-cluster`, shards 1 to 5 | routed | `build-cluster` | The blocking cluster selections |
| `test-cluster-gpu`, shards 1 to 3 | `blacksmith-12vcpu-macos-27`, not routed | `build-cluster` | The non-blocking cluster GPU selections |
| `test-cluster-gpu`, shards 1 to 3 | shards 1 and 3 routed; shard 2 `blacksmith-12vcpu-macos-27`, not routed | `build-cluster` | The non-blocking cluster GPU selections |
| `test-cluster-focused`, shards 1 and 2 | routed | - | The focused runner scripts and the pairing, diagnostics and placement flow runners (shard 1); the stage metadata, provisioning, onboarding and console runners (shard 2) |

The cluster lane builds in a job of its own, so the cluster tests start as soon
Expand Down Expand Up @@ -490,7 +490,7 @@ shard the lane its matrix entry names, `matrix.lane`.

| Workflow | Routed jobs | Fallback |
|---|---|---|
| `provider-tests.yml` (lanes requested by `provider-plan.yml`) | `test-provider` (lanes `test-provider-1` and `test-provider-2`, one per shard), `test-cluster` (lanes `test-cluster-1` for shard 1, `test-cluster-2` for shards 2 and 3, and `test-cluster-3` for shards 4 and 5), `test-cluster-focused` (one lane, `test-cluster-focused`, requested for both shards), `build-cluster`, `build-provider`, `cluster-release-checks` | `blacksmith-12vcpu-macos-27` |
| `provider-tests.yml` (lanes requested by `provider-plan.yml`) | `test-provider` (lanes `test-provider-1` and `test-provider-2`, one per shard), `test-cluster` (lanes `test-cluster-1` for shard 1, `test-cluster-2` for shards 2 and 3, and `test-cluster-3` for shards 4 and 5), `test-cluster-focused` (one lane, `test-cluster-focused`, requested for both shards), `build-cluster`, `build-provider`, `cluster-release-checks`, `test-cluster-gpu` (lanes `test-cluster-gpu-1` and `test-cluster-gpu-3`, one per shard; shard 2 is not routed) | `blacksmith-12vcpu-macos-27` |
| `ci-master.yml` (lanes requested by `provider-plan.yml`) | `release-integrity`, `docs` | `blacksmith-4vcpu-ubuntu-2404` |
| `docs-impact.yml` | `commit-signatures`, `docs-impact` | `blacksmith-4vcpu-ubuntu-2404` |
| `landing.yml`, `desktop.yml`, `nightly-linear-package.yml` | `check`, `frontend`, `test` | `blacksmith-4vcpu-ubuntu-2404` |
Expand Down Expand Up @@ -559,11 +559,11 @@ keep their fallback, so a push saves caches on Darkbloom only from an admitted
branch and only in routed lanes ([CI Caching](#ci-caching)).
Release, signing, publication, model registration, review automation and
`master` or dispatched cache warming keep literal Blacksmith labels. In CI,
every macOS job but Cluster GPU Tests reads its lane of the plan's one route
request (the plane routes a run attempt once); the plan's own bookkeeping (the
tree lookup, the component choice), the CI plan checks and the `Provider Tests`
gate run on `ubuntu-24.04`. Cluster GPU Tests run on `blacksmith-12vcpu-macos-27` and are
not routed ([Job sizes](#job-sizes)). A lane without a size gets the
every macOS job but Cluster GPU Tests shard 2 reads its lane of the plan's one
route request (the plane routes a run attempt once); the plan's own bookkeeping
(the tree lookup, the component choice), the CI plan checks and the
`Provider Tests` gate run on `ubuntu-24.04`. Cluster GPU Tests shard 2 runs on
`blacksmith-12vcpu-macos-27` and is not routed ([Job sizes](#job-sizes)). A lane without a size gets the
approval's pinned image size for its profile (one for macOS, one for Linux).
The macOS one measured 12 vCPU / 32 GiB on 2026-11-05 (run 42105290034,
attempt 1), the class of the Blacksmith 12-vCPU fallback; it is not a fixed
Expand Down Expand Up @@ -623,12 +623,15 @@ and memory pressure stayed normal.
| `build-cluster` | 1 | 8x16 | 10.91; a cold build takes 5 to 10% longer on 8 vCPUs | asks without a size |
| `build-provider` | 1 | 12x32 | 17.50; 8x24 is not signed, and a cold build takes 20% longer on 8 vCPUs | asks without a size |
| `cluster-release-checks` | 1 | 8x16 | 9.65 with a reused build; a cold release compile (run 42041608780: 11.33 GiB, 11.4 busy vCPUs at p95 of 12) takes 26% longer on 4 vCPUs and 5.5% on 8 | asks without a size |

A run that tests every component asks for 12 macOS jobs, while sizes are on
or off. The three Cluster GPU Tests shards are not routed: they run on `blacksmith-12vcpu-macos-27` (12 vCPU, 48 GiB). Shard 2 uses
41.99 GiB, which no signed size holds, and one lane carries one size for every
shard (shard 1 used 17.40 GiB when it ran the whole real-geometry rows check;
shards 1 and 3 each run half of it now).
| `test-cluster-gpu-1` (GPU shard 1) | 1 | 4x24 | 14.33 in run 42737118357, on Blacksmith with 48 GiB; at most 2.6 busy vCPUs | asks without a size |
| `test-cluster-gpu-3` (GPU shard 3) | 1 | 4x24 | 14.72 in run 42737118357, on Blacksmith with 48 GiB | asks without a size |

A run that tests every component asks for 14 macOS jobs, while sizes are on
or off. Cluster GPU Tests shard 2 is not routed: it runs on
`blacksmith-12vcpu-macos-27` (12 vCPU, 48 GiB). It uses 41.99 GiB (41.63 in
run 42737118357, 34.26 of it in the one process of `paged-verify-bench`), which
no signed size holds. Shards 1 and 3, which each run half of the real-geometry
rows check, have a lane each and fall back alone.

A lane sent with a size uses a grant only when the grant's labels are its
profile's labels with the last one qualified by the size, such as
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ shared build recipe. The
selected. A provider-only change runs 3 Macs (the provider build and the 2
provider shards). A cluster change adds 12 Macs (the cluster build, the release
build checks, 5 runtime shards, 2 focused shards and 3 GPU shards). Every
Mac job but the 3 GPU shards is routed; the GPU shards run on Blacksmith
Mac job but GPU shard 2 is routed; GPU shard 2 runs on Blacksmith
([job sizes](build.md#job-sizes)). A change whose tree a successful run of the
same workflow already tested runs no test job at all
(`scripts/ci-tested-tree.py`).
Expand Down Expand Up @@ -2101,7 +2101,7 @@ only the labels of that size. It also covers bad sizes, the macOS cap order and
a `required` lane, which keeps its fallback without asking while sizes are off.
It also pins each routed job's lanes (one per provider or cluster shard,
matching the job's matrix), size, fallback, timeout and read-only permissions,
and keeps release workflows and Cluster GPU Tests on literal Blacksmith
and keeps release workflows and Cluster GPU Tests shard 2 on literal Blacksmith
runners. No check contacts the real plane.

Docs-impact tests retain provider, protocol, privacy, native capacity, cache,
Expand Down
12 changes: 8 additions & 4 deletions scripts/test-cluster-test-plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,16 @@ def test_jobs_run_every_shard_of_their_lane(self):
for _, route_lane in entries:
self.assertIn(f" {route_lane} macos_arm64 ", self.jobs["route"])
else:
# The GPU shards are not routed: shard 2 needs more memory
# than any signed Darkbloom size.
# GPU shards 1 and 3 each read a lane of their own. Shard 2
# needs more memory than any signed Darkbloom size: it has
# no lane and keeps Blacksmith.
matrix = re.search(r"(?m)^ shard: \[([0-9, ]+)\]$", job).group(1)
self.assertEqual([int(shard) for shard in matrix.split(",")], plan.shards(lane))
self.assertIn(f" runs-on: {workflow.BLACKSMITH_MAC}\n", job)
self.assertNotIn(f" {job_id}", self.jobs["route"])
self.assertIn(f" runs-on: ${{{{ matrix.shard == 2 && '{workflow.BLACKSMITH_MAC}' || "
f"fromJSON(inputs.routes)[format('{job_id}-{{0}}', matrix.shard)] }}}}\n", job)
for shard in (1, 3):
self.assertIn(f" {job_id}-{shard} macos_arm64 ", self.jobs["route"])
self.assertNotIn(f" {job_id}-2 ", self.jobs["route"])
steps = {workflow.field(step, "name", indent=6): step for step in workflow.step_blocks(job)}
products = steps["Download cluster test products"]
self.assertEqual(workflow.field(products, "uses"), workflow.PRODUCTS_ACTION)
Expand Down
Loading
Loading