Repository navigation
test(#883): align GPU capability infra with the CTSolvers contract - #893
Merged
Merged
Conversation
A lost GPU device on the `kkt` runner failed loudly in test_gpu_routing.jl
but skipped silently in test_options_forwarding.jl, which never imported the
`on_gpu_runner()` guard. And `on_gpu_runner()` matched `RUNNER_NAME` exactly
("kkt"), dead against the runner's registered name `kkt-runner` — the same
bug CTSolvers fixed in #223.
Full alignment with the CTSolvers pattern (#190 + #223):
- `TestCapabilities` moves into test/runtests.jl as a Main-bound module of
constants (`CUDA_FUNCTIONAL`, `ON_GPU_RUNNER`, `GPU_EXTENSION_ARMED`).
`ON_GPU_RUNNER` now matches the `kkt`/`occidata` substring of RUNNER_NAME.
test/helpers/capabilities.jl (functions) is deleted.
- The three consumers (test_canonical, test_options_forwarding,
test_gpu_routing) read `Main.TestCapabilities.*`; every device guard has a
`Test.@test_skip` else branch.
- New test/suite/environment/test_environment_contract.jl centralises the
loud device requirement (`if ON_GPU_RUNNER; @test CUDA_FUNCTIONAL`) and
greps the suite for the isdefined-against-Main and unbraced-device-guard
anti-patterns.
Verified: suite/environment + suite/flows/test_gpu_routing +
suite/builders/test_options_forwarding green (44 pass, 2 broken); with
RUNNER_NAME=kkt-runner the contract test fails loudly on the absent device,
as designed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
Full suite green on this branch: 2246 pass, 2 broken, 0 fail (14m53s).
Loud-path check: |
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.
Closes #883.
Problem
test/helpers/capabilities.jlimplemented the Handbook's capability-gated-test policy, but partially:kktrunner whose driver broke,test/suite/flows/test_gpu_routing.jlfailed loudly (if on_gpu_runner(); @test is_cuda_on()), buttest/suite/builders/test_options_forwarding.jl— which imported onlyis_cuda_on— reportedBroken, indistinguishable from a laptop.on_gpu_runner()matchedRUNNER_NAMEexactly (in ("kkt", "occidata")). The self-hosted runners register askkt-runner/occidata-runner, so the check was dead on CI — the identical bug CTSolvers fixed in CTSolvers#223.test/suite/solve/test_canonical.jlguarded a whole GPU block behind a bareif is_cuda_on()with only an@infoon theelse— a silent skip.is_cuda_on()still sat intest/runtests.jl, and there was no central enforcement equivalent to CTSolvers'test_environment_contract.jl.Change — full alignment with the CTSolvers pattern (#190 + #223)
test/runtests.jlTestCapabilitiesis now aMain-bound module of constants:CUDA_FUNCTIONAL,ON_GPU_RUNNER(matches thekkt/occidatasubstring ofRUNNER_NAME),GPU_EXTENSION_ARMED. Duplicateis_cuda_on()removed.test/helpers/capabilities.jltest/suite/solve/test_canonical.jl,test/suite/builders/test_options_forwarding.jl,test/suite/flows/test_gpu_routing.jlMain.TestCapabilities.*; every device guard keeps aTest.@test_skipelse; the per-siteif on_gpu_runner()block is removed (now central)test/suite/environment/test_environment_contract.jlif ON_GPU_RUNNER; @test CUDA_FUNCTIONAL), and greps the suite for theisdefined-against-Mainand unbraced-device-guard anti-patternsCHANGELOG.md[2.2.0-beta]→ TestingNo package behaviour change — test infrastructure only.
Verification
suite/environment+suite/flows/test_gpu_routing+suite/builders/test_options_forwarding: 44 pass, 2 broken (the deliberate@test_skipdevice sites).RUNNER_NAME=kkt-runner julia --project -e 'using Pkg; Pkg.test(; test_args=["test/suite/environment"])'→ the contract test fails loudly on@test CUDA_FUNCTIONAL(no device on this machine), proving the loud path fires. Unset → green.Out of scope
occidatajob to.github/workflows/CI.yml—kktis still this repo's only GPU job;ON_GPU_RUNNERmatching both is future-proofing.test_canonical.jl's GPU loop into per-leaf@test_skip.🤖 Generated with Claude Code