Repository navigation
feat(ci): add ci:cpu-test-only label to skip GPU tests (#7375) - #8768
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
608e237 to
4d28b11
Compare
|
🎉 All checks passed! This PR is ready for review. |
There was a problem hiding this comment.
Let's also disable multi-GPU when ci:cpu-test-only is set. See on the test run https://github.com/ROCm/TheRock/actions/runs/37391207371?pr=8768 how "Multi-GPU Runner" is still set:
I wonder if the unit tests could then be reworked to check for the no mentions of "gpu" or "gfx" in the family info, instead of just looking for test-runs-on. Well, at least checking test-runs-on-multi-gpu in addition would help, but thinking of more general test design that catches bugs like this without needing to code directly for it.
| # CPU test runner for components that don't need GPU access (e.g., | ||
| # components with linux_cpu_runner: True). This allows CPU-only tests | ||
| # to run even when GPU testing is gated (e.g., trigger_test_label_only). | ||
| test_runs_on_cpu = get_cpu_test_runner(platform) |
There was a problem hiding this comment.
Future follow-up, we may want to use small/medium machines for CPU testing of some components. The default large runners are pretty oversized for some ctest/pytest projects. For that we could build off the code recently added here and plumb these through too:
# Select build runner using weighted distribution
build_runs_on_large = select_build_runner(platform, build_variant, size="large")
build_runs_on_small = select_build_runner(platform, build_variant, size="small")
build_runs_on_medium = select_build_runner(platform, build_variant, size="medium")There was a problem hiding this comment.
oh 100%. i'll do as follow-up
| # --------------------------------------------------------------------------- | ||
| # Emergency test-queue lever (ROCm/TheRock#8688) | ||
| # | ||
| # gfx110X Windows presubmit testing was removed from tests_on_trigger for | ||
| # test-queue remediation; builds still run on presubmit and tests are taken | ||
| # on-demand via the `ci:test:gfx110x` label. These tests pin that behavior. | ||
| # Superseded by the permanent build/test label plumbing in #8692. | ||
| # --------------------------------------------------------------------------- | ||
| class TestGfx110xWindowsTestLever(unittest.TestCase): | ||
| """gfx110X Windows: no presubmit tests by default, re-enabled by label. | ||
|
|
||
| The lever is scoped to Windows (ROCm/TheRock#8688): the `ci:test:gfx110x` | ||
| label must not re-enable Linux gfx110X presubmit tests, which stay | ||
| nightly-only. | ||
| """ | ||
|
|
||
| def _pr_inputs(self, **kwargs): |
There was a problem hiding this comment.
These TestGfx110xWindowsTestLever tests look unrelated to the cpu-test-only label? Are they from a different commit/PR/merge?
There was a problem hiding this comment.
yeah, that was messy with commits. it's resolved.
Add a new PR label `ci:cpu-test-only` that disables GPU tests while still allowing CPU-only tests to run. This is useful for changes that don't require GPU testing, such as documentation, build scripts, or CPU-only components. The label works by setting `test-runs-on` to empty (disabling GPU tests) while keeping `test-runs-on-cpu` populated, so components with `linux_cpu_runner: True` can still run their tests. Changes: - Add label definition to configure_ci_labels.py - Add gating logic in configure_multi_arch_ci.py - Document label in ci_behavior_manipulation.md - Add unit tests for the new functionality Closes #7375 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ci:cpu-test-only label was disabling single-GPU tests but multi-GPU runner info was still being included in the family_info, causing multi-GPU test jobs to be scheduled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddc186 to
546cbfa
Compare
Add a new PR label
ci:cpu-test-onlythat disables GPU tests while still allowing CPU-only tests to run. This is useful for changes that don't require GPU testing, such as documentation, build scripts, or CPU-only components.The label works by setting
test-runs-onto empty (disabling GPU tests) while keepingtest-runs-on-cpupopulated, so components withlinux_cpu_runner: Truecan still run their tests.Changes:
Working here: https://github.com/ROCm/TheRock/actions/runs/37391207371/job/112069740981?pr=8768 (i needed to fix unit tests)
Progress on #7375
ISSUE ID: #7375