Skip to content

ci: run only the GPU lanes a PR's changes need; move the CCO unit test to PIT-G17 - #948

Merged
jhchouuu merged 12 commits into
mainfrom
jiahzhou/ci-scope
Nov 10, 2026
Merged

jhchouuu merged 12 commits into
mainfrom
jiahzhou/ci-scope

Conversation

@jhchouuu

@jhchouuu jhchouuu commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #947. PR CI now runs only the GPU lanes a change needs, says on the PR which ones, spreads the CCO tests over two runners, and drops waits that did no work.

Lane selection

A new reusable workflow, ci-scope.yml, runs first in ci.yml, once per run. It runs .github/scripts/ci_scope.py on ubuntu-latest and outputs five lanes. ci_cco.yml no longer runs on its own: ci.yml calls it as a reusable workflow with the cco and fused lanes, so a PR push starts one CI run with one concurrency group and one gate.

lane jobs
mori MoRI CI on MI355X: intranode, internode, ROCm 10, JAX
mi300x MoRI CI on MI300X: intranode, internode
umbp UMBP unit test
cco CCO unit test (cco and EPv2), CCO EPv2 single-node test, CCO internode
fused CCO fused GEMM test (the fused GEMM + collective ops)

The build job runs when mori, umbp or cco runs.

The lanes follow the changed files. A rename counts under both its old and its new path.

a PR that changes runs
only docs, .claude/, or workflows that PR CI does not run no GPU lane
only UMBP umbp
only EPv2 (dispatch_combine_v2, jit/v2) cco
only the fused GEMM ops and their tests fused
only cco itself cco, fused
only IO mori, umbp (+ mi300x)
only ci_cco.yml cco, fused
core, build files, ci.yml or the scope itself mori, umbp, cco, fused

mi300x runs only when the change touches what the MI300X jobs exercise. That means:

  • EP v1, shmem, KIWI, mlx5, IO;
  • the shared RDMA/SDMA/bootstrap/topology code, include/mori/core, collective/CCL;
  • RDMA context/memory, CCL tests and driver, the EP v1/shmem/CCL pybinds, and jit/ except v2;
  • build files, or the label ci:mi300x.

Other behavior:

  • Non-PR events. Push to main and workflow_dispatch run every lane.
  • Drafts. A draft PR runs no GPU lane. Marking it ready starts CI; so does adding ci:full.
  • Pre-commit first. GPU lanes start only after the head commit's pre-commit check passed. If it failed, the scope job fails, says so on the PR, and no GPU job starts.
  • Routing comment. The scope job keeps one comment on the PR, updated in place on every run: the lanes that run, why, and a link to the run. It is the only job whose token can write (pull-requests: write), and it does not persist the token in its checkout; every other job's token is read-only.
  • Labels. ci:full runs every lane plus the full internode bench and stress sweeps; ci:mi300x adds the MI300X lanes to the lanes the files pick.
    • Adding either label re-runs the PR's latest CI run through ci-rerun.yml. The scope reads the labels live, so the re-run picks them up.
    • ci.yml does not run on labeled, so adding any other label starts nothing and leaves the PR's checks as they are.
  • Gate job. "CI gate" passes when every selected lane passed, CCO's included. A lane the scope skipped counts as passed.
  • Check names. The CCO checks now read MoRI CI test / CCO / CCO unit test (MI355X_AINIC) and so on.

python3 .github/scripts/ci_scope.py --files <list> prints the decision for a file list. Replayed over the 191 PRs merged since 2026-09-08:

lane PRs that run it
mori 42%
mi300x 35%
umbp 70%
cco 60%
fused 49%

Today every lane runs on every PR.

Jobs and runners

  • MI300X. The MI300X legs of intranode-test and internode-test are separate *-mi300x jobs, because a job-level if: cannot read the matrix.
    • Their steps and env are shared through YAML anchors, so they are identical, and the check names are unchanged.
    • The MI300X build job is gone: both MI300X test jobs build a superset of it.
  • build (MI355X). It also compiles KIWI (BUILD_OPS_KIWI=ON builds for gfx950), so every PR that runs it compile-checks KIWI.
  • CCO unit test. It moves from MI355X-AINIC to MI355X-AINIC-PIT-G17:
    • it runs with docker;
    • MORI_SOCKET_IFNAME/NCCL_SOCKET_IFNAME=eno0 are pinned, as for ci.yml's intranode test there;
    • it has the root-owned-workspace cleanup step that the other docker jobs have;
    • it gains a check that the hip EP backend registers with FlyDSL made unimportable.
  • CCO EPv2 single-node test. The EPv2 AsyncLL, routing-snapshot and bench steps are their own job on MI355X-AINIC, in the configuration they had in the CCO unit test there: no NIC selected by MORI_RDMA_DEVICES, socket interface auto-detected. On MI355X-AINIC-PIT-G17, test_asyncll.py's back-to-back check fails.
    • The shared container-start step passes MORI_SOCKET_IFNAME/NCCL_SOCKET_IFNAME only when the job sets them.
  • CCO fused GEMM test. The six fused GEMM steps are their own job on MI355X-AINIC, where they ran before. They use SDMA over loopback only. Setup and cleanup are shared with the CCO unit test through YAML anchors.
  • ci-rerun.yml. It re-runs the PR's latest ci.yml run, which now includes CCO. If that run predates this change, it also re-runs the ci_cco.yml run started with it, and says that only a new push gets a routed run: a re-run keeps its original workflow definition.
  • No cross-runner waits. internode-test (MI355X) no longer waits for build, and cco-internode-test no longer waits for cco-unit-test. The jobs they waited for run on other runners, and both build mori themselves.

Time that did no work

  • Fixed sleeps in the fused GEMM tests.
    • The eight fused GEMM test files slept 15 to 20 s before every 8-rank torchrun launch.
    • tests/python/cco/kfd_settle.py instead runs the launch, then waits for that launch's KFD processes to leave /sys/class/kfd/kfd/proc, capped at the old sleep. The retry after a queue-exhaustion failure is unchanged.
    • Measured on 8× MI355X with test_gemm_a2a_op.py + test_a2a_gemm_op.py (18 launches, two rounds each): 575 to 588 s before, 222 s after, with 2 s of waiting in total. No queue-exhaustion retry occurred in either.
  • Container teardown. docker/ci_stop.sh used to wait out the full 60 s stop timeout, because PID 1 (sleep infinity) ignores SIGTERM. It now waits, up to the same 60 s, for the interrupted workload to exit (zombies do not count), then stops with a 5 s timeout.
  • Workspace chowns. They are skipped on rootless podman (the MI355X-AINIC pair), where container root is already the runner user. Docker jobs that share those steps keep them.
  • shmem latency sweep. shmem_benchmark (P2P) runs its 1-thread latency sweeps up to 1 MiB. They used to run until the 60 s timeout killed them. Both shmem_benchmark steps now run with set -e.

Internode on a PR

  • Bench. The internode bench also gates correctness: each point verifies one full-capacity round in the default (MANUAL) launch geometry, which the nightly's AUTO-geometry bench does not cover. PRs and push to main run it at v1 and v1_ll × 64 and 4096 tokens, 4 of the 10 points. workflow_dispatch and ci:full run all 10.
  • Stress. The stress loop, which surfaces hangs and does not verify, runs v1:4096 and v1_ll:128. The full sweep runs where the full bench does, and in the nightly.
  • Unchanged. stress_accuracy and the async test still run.

🤖 Generated with Claude Code

jhchouuu and others added 7 commits November 9, 2026 14:20
…ts to the PIT-G17 runner

- New ci-scope workflow and .github/scripts/ci_scope.py pick the lanes (mori, mi300x, umbp, cco) from the PR's changed files
- Draft PRs run no GPU CI; GPU lanes wait for pre-commit; labels ci:full and ci:mi300x opt in
- MI300X build/intranode/internode are their own jobs, run on a PR only when EP v1, shmem, mlx5, IO or build files change
- Each workflow ends with a gate job that passes when every selected lane passed
- CCO unit test runs on MI355X-AINIC-PIT-G17 with docker, eno0 pinned, and a 90 min timeout

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…nternode lane on PRs

- tests/python/cco/kfd_settle.py: run a launch, then wait for its KFD processes to go
- The eight fused GEMM test files use it instead of sleeping 15-20 s before every launch
- PRs skip the internode bench sweep and run the stress loop at v1:4096 and v1_ll:128; other events run the full sweep

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- ci_scope.py adds the fused and epv2 lanes; a PR touching only EPv2 skips the fused GEMM steps, and the reverse
- ci_cco.yml gates the six fused GEMM steps and the nine EPv2 steps on them; the CCO internode job follows epv2

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- New cco-fused-test job runs the six fused GEMM steps on MI355X-AINIC; setup and cleanup steps are shared with cco-unit-test through anchors
- cco-unit-test (cco and EPv2) stays on PIT-G17 and no longer runs for a PR that changes only the fused GEMM ops
- The epv2 lane is gone: it always matched cco

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…aster podman teardown

- ci_scope.py reads labels live; ci:full/ci:mi300x runs compute the full lane set and share the PR's concurrency group; other labels skip only on the first attempt, so /ci-rerun re-runs a real run
- MI300X lanes also follow the shared RDMA/SDMA/bootstrap/topology, core, collective, CCL and NIC-detection code; renames count under both paths
- build runs for cco PRs too (BUILD_CCO_SDMA=OFF compile) and compiles KIWI; the MI300X build job is gone; internode-test and cco-internode-test no longer wait on jobs from another runner
- cco-unit-test checks that the hip EP backend registers without FlyDSL
- Internode bench and full stress sweep run only on workflow_dispatch or with ci:full (the nightly runs them)
- ci_stop.sh waits for the workload to exit instead of always waiting out the 60 s stop timeout

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ncy sweep

- On rootless podman (the MI355X-AINIC pair) the workspace chown steps are skipped; docker jobs sharing those steps keep them
- shmem_benchmark (P2P) runs the 1-thread latency sweeps up to 1 MiB, which used to hit the 60 s timeout
- Both shmem_benchmark steps run with set -e, so a killed launch fails the step

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
jhchouuu and others added 5 commits November 9, 2026 17:52
- The internode bench verifies one full-capacity round per point in the default launch geometry, so PRs and main run v1/v1_ll at 64 and 4096 tokens
- workflow_dispatch and ci:full run all 10 points; the nightly bench uses AUTO geometry

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…eep size, zombie-safe teardown

- ci-scope.yml takes has_mi300x; ci_cco.yml passes false, so ci:mi300x neither cancels nor repeats the CCO run there
- Only the first run of a non-CI label gets its own concurrency group; its re-run joins the PR's group
- The internode bench/stress sweep size comes from the scope's new full output (live labels), not the event payload
- ci_stop.sh ignores zombie processes and bounds its wait by wall time
- MI300X lanes also follow RDMA context/memory, CCL tests and driver, EP v1/shmem/CCL pybinds and jit/ (except v2)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- decide() returns `full` with the lanes, from the same label read
- the scope docstring lists the `full` output and the HAS_MI300X caveat
- ci_cco.yml's trigger comment no longer lists ci:mi300x

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…-AINIC

- new cco-v2-test job (cco lane) runs the three steps as before
- same runner, NIC list and socket auto-detection as the old unit job
- the shared start step passes a socket ifname only when the job sets one
- GDA skip comments in cco-unit-test name the runner they were set on
- cco-unit-test timeout back to 60 min

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…gh ci-rerun

- ci.yml calls ci_cco.yml with the cco and fused lanes: one scope, gate and concurrency group
- the scope job keeps one PR comment listing the lanes that run
- ci.yml no longer runs on labeled; adding ci:full or ci:mi300x re-runs CI via ci-rerun
- ci-rerun re-runs a ci_cco.yml run only next to a pre-routing ci.yml run
- workflow token read-only except the scope job, which does not persist it

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

GPU CI for 919c6954 (run): changed areas: build, ci_cco, ci_shared, fused

lane runs jobs
mori yes MoRI CI on MI355X: build, intranode, ROCm 10, JAX, internode
mi300x yes MoRI CI on MI300X: intranode, internode
umbp yes UMBP unit test
cco yes CCO unit test, CCO EPv2 single-node test, CCO internode
fused yes CCO fused GEMM test

Lanes follow the changed files. Adding ci:full re-runs CI with every lane and the full internode sweeps; adding ci:mi300x re-runs it with the MI300X lanes added. /ci-rerun re-runs CI against the current main.

@jhchouuu
jhchouuu merged commit c7ed9fe into main Nov 10, 2026
4 of 12 checks passed
@jhchouuu
jhchouuu deleted the jiahzhou/ci-scope branch November 10, 2026 07:06
QizhouZhang97 added a commit that referenced this pull request Nov 10, 2026
- cco-fused-test stays on MI355X-AINIC: after #948 and #970 PIT-G17 is as
  busy, and the speedup alone shortens PR waits more than the move does
- tp8-blockscale runs on every PR again: TP8 is the only blockscale shape
  wo_b has fitted plans for
- test_a2a_gemm keeps acquire="none", the README's variant, on PRs; "inv",
  the op's default that test_a2a_gemm_op.py runs, moves to ci:full
- the steps that pick GEMM+AR / GEMM+AG tests by mark share one file list,
  so a mark alone decides which step runs a test
- pytest-xdist is installed by docker/Dockerfile.dev, not at run time

Co-authored-by: Cursor <[email protected]>
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