Repository navigation
Add CUDA-12.8/13.0 Beaker image build matrix + cross-image CI test runner - #797
Conversation
Restructures the image targets into a clean matrix over two CUDA families, each optionally layered with flash-attn 4 and/or the symm-mem/RMA stack: CUDA 12.8 (torch 2.10, H100/B200): cu128, cu128-rma CUDA 13.0 (torch 2.11, +B300): cu130, cu130-fa4, cu130-rma, cu130-fa4-rma CUDA-13 images are built for sm_90/100/103, so one image runs on H100+B200+B300; tags carry no GPU generation, staying consistent with the older CUDA-12 images (tch<torch>cu<cuda>[-fa4][-rma]-<date>). Adds a proper RMA_TAG (was an IMAGE_SUFFIX hack). FA4 is CUDA-13 only — the flash-attn-4 package ships a cu13 extra and no cu12 — so there is no cu12.8 FA4 image. RMA is offered on both families (nvidia-nvshmem-cu12 / nvidia-nccl-cu12==2.29.7 exist). Adds src/scripts/beaker/build_all_images.sh: checks Docker + Beaker auth (token/login) + jq up front, then builds the matrix unattended, continuing past failures and printing a summary. Takes optional image-suffix args to build a subset. Dockerfile taken from the b300-image branch (adds the BASE_IMAGE / NVSHMEM / NCCL / FLASH_ATTN_4 / arch-list build args the matrix drives). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Describe the fa4-rma image by its contents (flash_4 + symm-mem/RMA) rather than naming a specific consumer, keeping the image infra decoupled. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
run_ci_tests_on_images.py launches a Beaker job per built image (2 GPUs each) running the full pytest suite, collects the JUnit results, and verifies every test executed (passed or failed) on at least one image — except tests that need more than 2 GPUs, which can't run on a 2-GPU node. Because backends differ per image (flash_3 on cu12.8, flash_4 on the fa4/cu13 images), no single image covers everything; the union should, which is what the check enforces. The coverage analysis is a pure function with a standalone --analyze-dir mode (re-runnable on downloaded JUnit XMLs), covered by tests. Beaker launch reuses BeakerLaunchConfig; result collection is best-effort via the beaker CLI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The launcher now runs each image across the GPU types it supports, pinning both the cluster and the canonical Beaker gpu_types constraint per target so a job only lands on the intended GPU. CUDA-12.8 images (sm_90/100) are launched on H100/B200 only; CUDA-13 images on H100/B200/B300. Result labels/files are <image>@<gpu>, and the coverage check runs over the union of all runs. Adds --gpus (subset) and --b300-clusters (the B300 cluster default is a guess). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Setting gpu_types alongside clusters over-constrained the placement (and the device-name string doesn't match Beaker's gpu-type constraint format), so jobs failed to find a satisfying cluster. AI2 clusters are homogeneous, so the per-GPU cluster list alone pins the GPU type. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ace) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ority) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aff73d5d8a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if xml is not None: | ||
| results[label] = parse_junit(xml) | ||
| else: | ||
| print(f"[collect] WARNING: could not fetch results for {label}; skipping in analysis.") |
There was a problem hiding this comment.
Treat missing JUnit files as failed matrix runs
When any Beaker run finishes without a fetchable junit.xml (for example the image cannot start, pytest crashes before writing XML, or the CLI fetch fails), this path only warns and drops that image@gpu from results; if at least one other run produced XML and the reduced union looks covered, the script exits 0. That can report the cross-image CI matrix as passing while an entire required image/GPU combination was never tested, which is especially risky for the image-specific CUDA/FA4/RMA coverage this runner is meant to validate.
Useful? React with 👍 / 👎.
Adds a Beaker image build matrix and tooling to build the images and run the CI test suite across them on GPUs.
Image matrix
Two CUDA families, each with optional add-ons:
Optional layers, gated by build args so the default image is unchanged:
flash_attn.cute, theflash_4attention backend) — prebuilt wheel, CUDA-13 only. Pinsnvidia-cutlass-dslto a 4.5-era release (the FA4 betas float the pin, and cutlass-dsl 4.6.x dropped an API the wheel calls).B300 handling: FA3 is skipped for B300 (it builds no sm_103 kernels and its bundled CUTLASS won't compile against CUDA 13); flash-attn 2 and grouped_gemm take
sm_103via per-tool arch lists. Image tags carry no GPU-generation suffix, staying consistent with existing image names.Tooling
Makefile:beaker-image-{cu128, cu128-rma, cu130, cu130-fa4, cu130-rma, cu130-fa4-rma}targets bundling the right build args per combination.src/scripts/beaker/build_all_images.sh: builds every matrix image (checks Docker + Beaker auth + jq up front, continue-on-error, prints a summary).src/scripts/beaker/run_ci_tests_on_images.py: launches the pytest CI suite on each image across GPU types (2 GPUs/launch), collects the JUnit results, and reports union coverage — confirming every test runs on at least one image (excluding >2-GPU tests). GPU type is selected by cluster; workspace and priority are CLI-configurable. Covered bysrc/test/scripts/run_ci_tests_on_images_test.py.