Repository navigation
CI: every Darkbloom macOS job names a signed VM size - #70
Merged
Merged
Conversation
A macOS job without a size gets the approval's pinned size (12 vCPUs, 32 GiB). Each Fork Tests job now names its size in its runner label: build-cpp 8x16 (it took 940 s on the hosted 3-vCPU Mac, so 4 vCPUs would pass 10 minutes), and build-wheel, the Python shards and metal-build-and-test 4x16. test_init_reduce_large_output still runs on 4x16: a Metal buffer can have 8 GiB and memory_size is 16 GiB. Every macOS job runs the report-only resource sampler of Layr-Labs/d-inference (wrapped to this repository's ruff rules) so that its log gives the measured memory peak and busy vCPUs. test-runner-sizes.py, run in Check Lint, fails when a macOS job names no signed size or a size other than its table gives. FORKDIFF.md (Job sizes) gives the data; fork.yaml lists the new scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first sampled run (44750715218) measured every macOS job: - python-cpu peaked at 12.37 to 13.20 GiB used on 4x16, with up to 7.1 GiB compressed and memory pressure at warning once. 16 GiB is less than 1.3 times that, so the CPU shards ask for 4x24. - build-cpp took 302 s on 8x16 and peaked at 10.42 GiB; the sampler scales its CPU time to about 335 s on 4 vCPUs, so it asks for 4x16. FORKDIFF.md (Job sizes) records the measured peaks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Used memory counts compressed pages at their compressed size, so on 4x16 it hid part of the Python shards' demand. Run 44754340762 measured the CPU shards on 4x24 at 19.26 GiB used (17.89 GiB of process footprints), and python-gpu shard 1's processes reach 13.21 GiB on 4x16. With 30% headroom the CPU shards need more than 24 GiB, so they ask for 12x32, the next signed size with more memory; the GPU shards ask for 4x24. A job's peak is now the larger of used memory and the footprint sum (FORKDIFF.md, Job sizes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
David, 2026-11-20: shrink the macOS CI VMs of the three MLX repositories. Every Darkbloom macOS job here now names its VM size, so none relies on the approval's pinned 12x32.
fork-tests.yml)build-wheelbuild-cpppython-gpu(2 shards)python-cpu(3 shards)metal-build-and-testThe first head gave
build-cpp8x16 and the Python shards 4x16. The sampler's data moved them (see Validation).test_init_reduce_large_outputskips where its 4 GiB output does not fit: on the GPU it needsmax_buffer_length>= 4 GiB, on the CPUmemory_size>= 16 GiB. The GPU shards (a Metal buffer can have half of the VM's memory) and the CPU shards give both, so the test still runs: all three runs ran it on the GPU and on the CPU (... ok).The new Python files follow this repository's ruff rules (pre-commit
ruff-checkandruff-format), so the sampler copy has wrapped lines; the logic is unchanged.fork.yamllists the three new scripts. Check Lint runs the two new tests after pre-commit.How a job names its size
A Darkbloom macOS job that names no size gets the size that the approval pins, today 12 vCPUs and 32 GiB. A job outside a route asks for a size with its runner label (darkbloom-sandbox
docs/developer/ci-routes.md, "Asking for a VM size"):[self-hosted, macOS, ARM64, darkbloom-macos-arm64-4x16]. Admission then runs it on the pinned image's signed sibling of that size. The size label needs noDARKBLOOM_JOB_SHAPES; that variable gates only the route workflow's lane sizes. This repository's route workflow has one Linux lane (codeql), and the route refuses a size on a Linux lane.This mirrors Layr-Labs/d-inference ml-explore#2409: every macOS lane names a signed size, and a test fails on any that does not.
The check
.github/scripts/test-runner-sizes.pyreads every workflow. It fails when:runs-onasks fordarkbloom-macos-arm64without a size, or with a size other than 4x16, 4x24, 8x16 and 12x32;.github/actionlint.yamldoes not list a used sized label, or still lists the bare label.Its third test feeds it an unsized job, an unsigned size, a block-form
runs-onand two bad lanes, and requires a refusal for each.Measuring
There was no memory data: no job of this repository logged a memory peak. Every macOS job now runs
.github/scripts/ci-resource-sampler.py, the report-only sampler of d-inference (scripts/ci-resource-sampler.py, with its offline testtest-ci-resource-sampler.py). It starts after the checkout and its last step ("Report the resource samples",always()) prints the peak of used memory (app + wired + compressed), swap, the three largest processes, the busy vCPUs, and the time scaled to 4 and 8 vCPUs. It never fails a job. This PR's CI run is the first run at the new sizes; the measured peaks are below.No step, test, timeout or check name changes.
Validation
Three runs, each measured by the sampler. A job's peak is the larger of used memory (app + wired + compressed) and the sum of its processes' lifetime peak footprints, because used memory counts compressed pages at their compressed size. The idle VM uses about 6 GiB. The rule: the smallest signed size with 30% headroom over the peak (16 GiB holds 12.3, 24 GiB 18.5, 32 GiB 24.6).
f2cf828)ddc9c04)4e4814c, final)build-wheelbuild-cpppython-gpupython-cpumetal-build-and-testEvery job of the final head is under 10 minutes and within its headroom. No job swapped.
python-cpugenuinely needs 12x32: its three to four parallel test processes use about 18 to 21 GiB, more than 24 GiB / 1.3. So the approval must keep 12x32 signed for this repository;python-gpuneeds 4x24.🤖 Generated with Claude Code