Repository navigation
test(rocm): add a local verify-rocm gate with a shared build-and-generate smoke - #2008
Merged
Merged
Conversation
…rate smoke `make verify` is Metal-only: `verify-clippy` and `verify-test` carry `--features metal,accelerate`, so it does not run on this host at all. ROCm had only the single `verify-test-rocm` target and no aggregate, which meant every gate run here was an ad-hoc command line. `verify-rocm` mirrors what `verify` does for Metal, reusing the four backend-agnostic checks and adding ROCm clippy, the ROCm test gate, and a smoke. `verify` keeps its documented contract of matching the nightly-verify job, which is macOS Metal, untouched. The smoke is the part `verify-test-rocm` cannot cover. A test run misses three failure classes: a binary that links but cannot start because the ROCm rpath is missing, which is how #1802 shipped; a kernel that compiles and links but launches nothing, the shape of the #1825 gaps; and a run that quietly lands on the CPU. Its body lives in `scripts/ci/rocm_smoke.sh` so that the parked `ROCm build and generate` job and this target run the same thing. That matters more than usual because the job never runs until a gfx1151 runner exists, so the local target is the only thing exercising the script and an inline copy in the workflow would rot unnoticed. Two things were wrong before measurement corrected them. The device assertion did not do what its comment claimed. `custom kernel backend: rocm` names the backend MLX resolved, not the device the run used, and those deliberately do not track each other, which #1805 documented and `gpu_backend_available_does_not_track_the_default_device` pins. A run forced onto the CPU with `MLXCEL_DEVICE=cpu` still prints it, so the assertion accepted a CPU run. It now reads `Runtime device: GPU`, verified against a real CPU run and a real GPU run. The same wrong claim in the workflow comment is corrected here. The cap on cargo parallelism was attributed to the core count. The dominant cause is that this host shares 30 GiB with the GPU services it also runs: three `llama-server` processes were measured holding 25.5 GiB, leaving about 2 GiB for a build. `ROCM_JOBS` says that, and the smoke reports available memory and names the largest resident processes before building, because an OOM kill partway through a compile otherwise reads as an unrelated crash. That warning was observed firing and then correctly predicting the kill. Validated on the gfx1151 host: the smoke runs end to end when memory is free, reporting `OK: 32 tokens, 24 word-like tokens of generated text`; a missing checkpoint is refused; a CPU run is refused. `verify-test-rocm` completes with four targets still failing, all tracked: the nvfp4 abort of #1806 and the sampler aborts of #1885. The WebUI catalog tests that used to fail now pass, since #1886 landed. Refs #1811, #1801.
`verify-rocm` listed the smoke after the test gate, and make stops at the first failing prerequisite. The ROCm test gate has known failures, the nvfp4 abort of #1806 and the sampler aborts of #1885, so the smoke was never reached: the first full run of the target ended without it having executed once. It now runs before the suite, which also means a developer gets the "does a real forward pass still run on this device" answer while the suite is red. Confirmed by re-running: the smoke reports `OK: 32 tokens, 24 word-like tokens of generated text`, then the gate fails on the three known targets. The `ROCM_JOBS` rationale gains the number that settles it. With the GPU services on this host stopped, a full run at `-j 6` never dropped below 14.8 GiB available, against 116 MB when three `llama-server` processes held 25.5 GiB. The cap is conservative on a free machine, and the co-tenants really were the constraint rather than the core count. Refs #1811, #1801.
This was referenced Sep 28, 2026
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.
Refs #1811, #1801.
make verifyis Metal-only:verify-clippyandverify-testcarry--features metal,accelerate, so it does not run on this host at all. ROCm had only the singleverify-test-rocmtarget and no aggregate, which meant every gate run here was an ad-hoc command line.verify-rocmmirrors whatverifydoes for Metal, reusing the four backend-agnostic checks and adding ROCm clippy, the ROCm test gate, and a smoke.verifykeeps its documented contract of matching the nightly-verify job, which is macOS Metal, untouched.The smoke is the part
verify-test-rocmcannot cover. A test run misses three failure classes: a binary that links but cannot start because the ROCm rpath is missing, which is how #1802 shipped; a kernel that compiles and links but launches nothing, the shape of the #1825 gaps; and a run that quietly lands on the CPU. Its body lives inscripts/ci/rocm_smoke.shso that the parkedROCm build and generatejob and this target run the same thing. That matters more than usual because the job never runs until a gfx1151 runner exists, so the local target is the only thing exercising the script and an inline copy in the workflow would rot unnoticed.Two things were wrong before measurement corrected them.
The device assertion did not do what its comment claimed.
custom kernel backend: rocmnames the backend MLX resolved, not the device the run used, and those deliberately do not track each other, which #1805 documented andgpu_backend_available_does_not_track_the_default_devicepins. A run forced onto the CPU withMLXCEL_DEVICE=cpustill prints it, so the assertion accepted a CPU run. It now readsRuntime device: GPU, verified against a real CPU run and a real GPU run. The same wrong claim in the workflow comment is corrected here.The cap on cargo parallelism was attributed to the core count. The dominant cause is that this host shares 30 GiB with the GPU services it also runs: three
llama-serverprocesses were measured holding 25.5 GiB, leaving about 2 GiB for a build.ROCM_JOBSsays that, and the smoke reports available memory and names the largest resident processes before building, because an OOM kill partway through a compile otherwise reads as an unrelated crash. That warning was observed firing and then correctly predicting the kill.Validated on the gfx1151 host: the smoke runs end to end when memory is free, reporting
OK: 32 tokens, 24 word-like tokens of generated text; a missing checkpoint is refused; a CPU run is refused.verify-test-rocmcompletes with four targets still failing, all tracked: the nvfp4 abort of #1806 and the sampler aborts of #1885. The WebUI catalog tests that used to fail now pass, since #1886 landed.What was verified
The aggregate was run end to end on the gfx1151 host with the GPU services stopped. The smoke runs and passes, then the suite fails on the three known targets:
Three, not four:
-p mlxcel --libnow passes, because #1886 fixed the WebUI catalog rows that used to fail on ROCm. The remaining three are the sampler aborts of #1885 and the nvfp4 abort of #1806, both tracked. The aggregate failing is the honest outcome, not a defect in it.That first run is also what caught the ordering bug fixed in the second commit here. With the test gate first, make stopped there and the smoke never executed at all.
The memory preflight was verified in both directions. Under pressure it warns and names the cause, and the build it warned about was then OOM-killed:
With the services stopped it stays quiet, as above. The assertions were each exercised: a missing checkpoint is refused, and a run forced onto the CPU is refused by the corrected
Runtime device: GPUcheck.