Repository navigation
[CI] Re-enable multi-GPU tests on two-GPU runners - #8275
Conversation
|
run-ci |
|
| mapfile -t visible < <(seq 0 $((DEV_COUNT - 1))) | ||
| fi | ||
| swapped=("${visible[1]}" "${visible[0]}" "${visible[@]:2}") | ||
| launch_shard "1-gpu0" 1 "$(IFS=,; echo "${swapped[*]}")" |
There was a problem hiding this comment.
Both the original shard and 1-gpu0 select cuda:1. The queue names shards from resolve_test_sim_device(), not the name passed to launch_shard, so both GPUs put completed files under done/cuda-1. The summary combines them into one row, hiding which files ran on physical GPU 0. Pass a separate shard identifier to the queue helpers so each GPU has its own summary.
There was a problem hiding this comment.
Fixed in 127d9f44286: each shard exports ISAACLAB_TEST_QUEUE_SHARD (cuda-1, cuda-1-gpu0) and tools/conftest.py files its queue claims under it, so the summary has one row per physical GPU.
| else: | ||
| print(f"::warning::{report} not found; smoke coverage unknown") | ||
|
|
||
| for case in skipped: | ||
| print(f"::warning::multi-GPU smoke did not run {case}") | ||
| with open(os.environ["GITHUB_OUTPUT"], "a") as fh: | ||
| fh.write(f"device_skips={len(skipped)}\n") |
There was a problem hiding this comment.
A missing report still produces device_skips=0. If an image pull fails before the tests start, the counting step runs anyway and the coverage job turns green without a report. A parse failure also leaves an empty output that the coverage job treats as zero. Report missing or unreadable results separately, and mark coverage as unknown or failed rather than claiming no GPU skips.
There was a problem hiding this comment.
Fixed in f750c87d0c4 and 37592e184bd: a missing or unreadable report now writes device_skips=unknown, and the coverage job fails on unknown or an empty count.
|
|
||
| - name: Restore Warp kernel cache | ||
| if: needs.changes.outputs.unit == 'true' | ||
| uses: actions/cache/restore@v4 |
There was a problem hiding this comment.
Cache action can change unseen
The new cache step uses the movable v4 tag, so upstream can change the code this self-hosted job runs without a change to this repository. Pin actions/cache/restore to a full commit SHA, as this workflow already does for actions/checkout.
How this was verified: The added step uses actions/cache/restore@v4 in a job that runs on a self-hosted multi-GPU runner.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Keeping @v4: every actions/cache reference in the repo (build.yaml, check-links.yml, run-package-tests, ovrtx-shader-cache) uses the major tag, so this matches the existing convention.
There was a problem hiding this comment.
You're right — consistency with the repository's existing actions/cache usage is the relevant standard here. Keeping @v4 is appropriate, so I'll withdraw this comment.
There was a problem hiding this comment.
Isaac Lab Review Bot
The CI restructuring improves multi-GPU utilization, but several correctness gaps weaken its validation: six smoke cases are unconditionally xfailed, missing JUnit reports are reported as zero skips, device-mask handling can expose the wrong GPUs, and the extra shard can launch after the Torch device cap drops below two. Concurrent jobs can also rebuild the same base-image tag, while redundant workflow gates and contradictory hardware comments add avoidable maintenance cost.
- Design and architecture: Removing the shared base-image build job leaves the unit and Kit smoke jobs independently invoking
ecr-build-push-pullfor the same$CI_IMAGE_TAG. When both gates fire on a cache miss, the jobs can perform duplicate full builds on scarce multi-GPU runners and race to push the same tag. Restore a single owner for building that tag while allowing downstream jobs to pull it. - Scope and complexity: The change spans several independently reviewable CI responsibilities, and the repeated step-level unit gates are unnecessary because the job already owns that condition. Suggested PR breakdown: (1) image-resolution topology and job routing, with one base-image build owner and validation of exact-hit, dependency-hit, and cache-miss paths; (2) unit-shard concurrency, Warp cache mounting, Torch device discovery, and swapped-device fan-out, validated with both normal and Torch-capped device counts; (3) training-smoke rightsizing, device-mask preservation, scoped expected failures, and JUnit coverage reporting, validated independently in the Kit and kit-less lanes.
- API: No public Python API, task ID, serialized format, or user-facing CLI contract changes were identified. The smoke-test helpers remain private, and the shell launcher adds optional
TEST_JOBSandWARP_CACHE_HOST_DIRinputs. The inheritedCUDA_VISIBLE_DEVICESbehavior still needs correction because the default-order smoke path currently removes a mask that_visible_gpus()used to determine its rank count. - Compatibility and deprecation: Breaking changes: none identified. The new launcher environment variables are additive and default safely when unset, and the test-only package change includes a
.skipchangelog fragment. The reviewed public API and configuration surfaces remain unchanged. - Implementation: Three execution-path issues need correction.
smoke_device_skips.pywritesdevice_skips=0when its JUnit report is missing, causing the coverage job to claim full coverage without evidence. The swapped GPU-0 shard launches even if the Torch cross-check lowersDEV_COUNTbelow two, producing an invalid mask while requestingcuda:1. Finally, the default-order smoke path passesNoneto_run_training, which removes an inheritedCUDA_VISIBLE_DEVICESmask after_visible_gpus()counted devices under that mask; preserve the inherited ordering instead. - Style consistency: The added RTX/NCCL comment identifies the current pool as 2x RTX PRO 4500, while the nearby timeout rationale still describes the CI pool as 4x A10G. Update or remove the stale hardware-specific rationale. The unit job also repeats its job-level change gate on three steps; deleting those conditions leaves one clear owner for the routing invariant.
- Test quality: The changed smoke test now isolates concurrent runs with unique experiment directories and retains distinct default-order and rotated-order coverage. However,
_RTX_NCCL_XFAILapplies unconditionally to three stacks across both device orders, so six full multi-rank cases can hide unrelated failures on every host and non-strict XPASS results do not retire the marker. Scope the expected failure to the affected runner and failure mode, or otherwise make unexpected passes and unrelated failures visible.
Significant concerns. Posted 7 actionable findings inline.
Automated review; human maintainers own approval decisions.
| if skip is not None and _DEVICE_SKIP in skip.get("message", ""): | ||
| skipped.append(f"{case.get('name')}: {skip.get('message')}") | ||
| else: | ||
| print(f"::warning::{report} not found; smoke coverage unknown") |
There was a problem hiding this comment.
🟡 Warning · Implementation — Missing report counted as full coverage
When the JUnit report is absent the script only warns and still writes device_skips=0, and the coverage job additionally defaults empty outputs to 0. The guard then prints "No multi-GPU training smoke case was skipped" while it has no evidence any case ran, which is exactly the lost coverage it exists to surface. Emit an explicit unknown value and make the coverage job reject it, or exit non-zero when the report is missing.
There was a problem hiding this comment.
Fixed in f750c87d0c4 and 37592e184bd: a missing or unreadable report now writes device_skips=unknown, and the coverage job fails on unknown or an empty count.
| fetch-depth: 1 | ||
| lfs: true | ||
|
|
||
| - name: Build or pull image from ECR |
There was a problem hiding this comment.
🟡 Warning · Design Architecture — Two jobs build the same base image
With the shared build job removed, test-multi-gpu-pytest and this job both invoke ecr-build-push-pull for the same $CI_IMAGE_TAG and docker/Dockerfile.base, with no ordering between them. A Dockerfile.base, pyproject.toml, or uv.lock change triggers both gates and misses the deps cache, so each job runs a full base-image build on a scarce multi-GPU runner and races the push of the identical tag. Keep one builder for that tag.
There was a problem hiding this comment.
Fixed in 37592e184bd: a single build job pushes the commit tag again; the unit shards and the Kit smoke both depend on it and only pull.
| # Newton or OvPhysX physics with an RTX renderer: NCCL setup fails with "Cuda failure 'invalid | ||
| # argument'" on the 2x RTX PRO 4500 CI runners. PhysX with Kit RTX, and every Newton-renderer | ||
| # stack, train on the same runners. | ||
| _RTX_NCCL_XFAIL = pytest.mark.xfail(reason="NCCL 'invalid argument' with Newton/OvPhysX physics and an RTX renderer") |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Unconditional xfail silences six smoke cases
This mark applies to three stacks, so six parametrized cases still launch full multi-rank training while their outcome is discarded on every host, not only the 2x RTX PRO 4500 pool. Because pytest's xfail is non-strict by default, an unrelated regression (OOM, hang, launcher or renderer device-selection fault) reports green, and nothing flags the marker once the NCCL issue is fixed. Scope it to the affected runner and failure, or make it strict.
There was a problem hiding this comment.
Keeping these markers as is: they are temporary. #8280 fixes the NCCL failure next and removes them.
| mapfile -t visible < <(seq 0 $((DEV_COUNT - 1))) | ||
| fi | ||
| swapped=("${visible[1]}" "${visible[0]}" "${visible[@]:2}") | ||
| launch_shard "1-gpu0" 1 "$(IFS=,; echo "${swapped[*]}")" |
There was a problem hiding this comment.
🔵 Suggestion · Implementation — Extra shard ignores torch device cap
The torch cross-check can lower DEV_COUNT to 1 after the -lt 2 guard has passed. The loop then launches nothing, but this shard still runs: visible holds one entry, so swapped expands the unset visible[1] to empty and the shard starts with CUDA_VISIBLE_DEVICES=",0" while demanding cuda:1. That replaces a clear reconciler failure with a confusing crash. Guard this launch with the same DEV_COUNT >= 2 condition.
There was a problem hiding this comment.
Fixed in 127d9f44286: the two-device minimum now runs after the torch cap, so the extra shard never launches with fewer than two devices.
| pull-on-deps-hit: 'true' | ||
|
|
||
| - name: Resolve Warp cache key | ||
| if: needs.changes.outputs.unit == 'true' |
There was a problem hiding this comment.
🔵 Suggestion · Scope Complexity — Step conditions duplicate the job gate
The job is now gated by if: needs.changes.outputs.unit == 'true' (line 113), so the identical conditions added here and on the cache-restore and shard-run steps can never evaluate false; the adjacent image step correctly omits one. They were only needed while the job used always() && needs.build.result == 'success'. Delete all three so a single condition owns the routing invariant.
There was a problem hiding this comment.
Fixed in 37592e184bd: removed the three step-level conditions.
| # Not sorted and not contiguous-from-zero, so no rank resolves by assuming the list is ordered. | ||
| _UNORDERED_DEVICES = (3, 1, 2, 0) | ||
| # Newton or OvPhysX physics with an RTX renderer: NCCL setup fails with "Cuda failure 'invalid | ||
| # argument'" on the 2x RTX PRO 4500 CI runners. PhysX with Kit RTX, and every Newton-renderer |
There was a problem hiding this comment.
🔵 Suggestion · Style Consistency — New comment contradicts retained pool description
This comment states the CI runners are 2x RTX PRO 4500, while the timeout rationale a few lines above still asserts "the CI pool is 4x A10G, well below the L40S these were first measured on". The two descriptions of the same pool cannot both be current, leaving the idle-timeout justification stale. Update the earlier rationale to the current hardware or drop the hardware-specific history there.
There was a problem hiding this comment.
Fixed in 44a99f6081d: the timeout rationale no longer names a runner type.
| def test_camera_training(self, stack: str, rotated: bool) -> None: | ||
| """Camera-rendered training on every visible GPU for one backend stack and device order.""" | ||
| num_gpus = _visible_gpus() | ||
| devices = _rotated_devices(num_gpus) if rotated else None |
There was a problem hiding this comment.
🔵 Suggestion · Implementation — Default order drops inherited device mask
_visible_gpus() counts devices under the inherited CUDA_VISIBLE_DEVICES, but the default-order branch passes None, so _run_training removes the mask entirely. On a runner narrowed to a subset, the case launches one rank per masked device while exposing every host GPU, contradicting the new "one rank per visible GPU" contract and the rotated branch, which deliberately preserves the inherited mask. Pass the inherited visible list instead of None.
There was a problem hiding this comment.
Fixed in 44a99f6081d: devices=None now leaves the inherited CUDA_VISIBLE_DEVICES untouched, matching the docstring and the count _visible_gpus() made.
|
run-ci |
|
Keeping this as one PR: the three parts share one goal, multi-GPU CI run time on the 2-GPU runners, and were measured together; the timing table in the description reflects all three. |
| @@ -0,0 +1,44 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
Do we need this? I think we can skip this check for simplicity
| _NUM_ENVS = "512" | ||
| # Small on purpose: Kit boot dominates the runtime, and the defect these guard reproduces at any | ||
| # env count. Kept small enough that several cases share a GPU, so CI runs them concurrently. | ||
| _NUM_ENVS = "64" |
There was a problem hiding this comment.
We could probably go even smaller, theres no functional difference between 64 and 2 in the eyes of the CI (2 per GPU)
| @@ -69,34 +69,34 @@ | |||
| _PHYSICS_ONLY_TASK = "Isaac-Cartpole-Direct" | |||
| _CAMERA_TASK = "Isaac-Cartpole-Camera-Direct" | |||
There was a problem hiding this comment.
Is there a benefit of checking the physics only if we are also checking the physics + rendering example?
|
run-ci |
|
run-ci |
Run up to four files per shard, use physical GPU zero through a rotated device mask, and keep independent work-queue records for shards sharing the same CUDA index. Reuse the Warp cache and resolve torch from the image virtual environment.
Use at least two ranks, rotate inherited masks, explicitly select both backends, and isolate concurrent run directories. Fail smoke cases on undersized CI runners. Retain the temporary RTX exclusions until the stacked runtime fix restores those cases.
Build the shared Kit image once and run unit shards, Kit smoke, and kitless smoke in separate lanes. Restore the Warp cache and run four training cases concurrently per smoke lane.
6a14859 to
80c1d9b
Compare
|
run-ci |
Limit the temporary exclusion comment to the observed PyTorch 2.12 failure on the two-GPU Blackwell runners and the stacked setup fix. Avoid claiming an unverified Linux driver implementation detail.
|
run-ci |
|
run-ci |
|
Backported to |
## Review Map | PR | Depends on | Exact changes | |---|---|---| | 📌 #8275 Re-enable multi-GPU tests on two-GPU runners | — | [CI changes](https://github.com/isaac-sim/IsaacLab/pull/8275/files/953d0425d291963320b41720984846894bc606ce..824fcdbda6dfbbde241356f7066c48dc6cb954af) | | #8280 Restore RTX multi-GPU training with PyTorch 2.11 | #8275 | [RTX fixes](https://github.com/isaac-sim/IsaacLab/pull/8280/files/2a2d654b7d6b6ec9057ea586340d2a1574cf325f..cac1c141ff7e84553d7b8b2dc7b6f626b610fdf7) | Exact changes shows each PR's own changes; the child PR page includes its parent. ## Summary Re-enable multi-GPU CI coverage on two-GPU runners while exercising non-default devices. Run unit shards and small distributed-training cases concurrently, with shared image and kernel caches. # Description The pool moved to two-GPU `g7.12xlarge` runners (RTX PRO 4500 Blackwell). Unit files ran serially and 14 of 15 training cases skipped because they required four GPUs, leaving the workflow green without coverage. 1. Run four files per unit shard, reuse the Warp cache, and use physical GPU 0 through a rotated mask while still testing a non-default CUDA index. Give those shards distinct queue records and fix torch discovery in the image venv. 2. Launch one rank per visible GPU (minimum two), preserve inherited device masks, explicitly name both backends, and isolate concurrent experiment folders. Let torchrun bind rendezvous ports automatically so concurrent cases cannot race a free-port probe. Fail undersized CI runners instead of skipping. 3. Retain separate Kit and kitless image-build jobs. Unit and Kit smoke jobs wait for the Kit builder; kitless smoke waits for its restored builder. Every call uses the existing build-or-pull action. Once their images are ready, test lanes run concurrently; each smoke lane runs four cases at once, with two environments per rank. This parent retains eight RTX `xfail(run=False)` cases for the current NCCL failure. #8280 supplies the matched dependency setup and OVRTX device selection and restores all 15 cases, including both device orders. Previously measured job times on fresh two-GPU Blackwell runners, including image pull but excluding image build and runner wait: unit shards 28.7 → 9.1 min, Kit smoke 9.2 min, kitless smoke 7.0 min. Those parent timings include the RTX exclusions; the child description links validation with all cases enabled. ### Validation At `824fcdbda6d`, the original `build-kitless` job is restored verbatim from `develop`; its smoke consumer again depends on it and checks builder success. YAML validation, formatting/lint, commit hooks and merge/scope checks pass. This restoration changes only the MGPU workflow. Latest `develop` at `953d0425d29`, including the shared Isaac Sim 6.2 image update, is included. Current-head [multi-GPU CI](https://github.com/isaac-sim/IsaacLab/actions/runs/37392837540) and [Docker + Tests](https://github.com/isaac-sim/IsaacLab/actions/runs/37392897747) are running. The previous head passed all 26 required checks, ARM CI and MGPU coverage: 7 executed training cases plus 8 retained RTX xfails; all 36 unit files completed with 284 passes, 4 existing skips and no failures, unclaimed files or queue orphans. Those prior results do not validate this restored topology or the new base image. PR8280 remains on its previous parent until this head is validated. ## Type of change - Bug fix (non-breaking change which fixes an issue) - CI performance improvement ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the [test-audit criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md) to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump package versions — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there (cherry picked from commit 95235d2)
Review Map
Exact changes shows each PR's own changes; the child PR page includes its parent.
Summary
Re-enable multi-GPU CI coverage on two-GPU runners while exercising non-default devices.
Run unit shards and small distributed-training cases concurrently, with shared image and kernel caches.
Description
The pool moved to two-GPU
g7.12xlargerunners (RTX PRO 4500 Blackwell). Unit files ran serially and 14 of 15 training cases skipped because they required four GPUs, leaving the workflow green without coverage.This parent retains eight RTX
xfail(run=False)cases for the current NCCL failure. #8280 supplies the matched dependency setup and OVRTX device selection and restores all 15 cases, including both device orders.Previously measured job times on fresh two-GPU Blackwell runners, including image pull but excluding image build and runner wait: unit shards 28.7 → 9.1 min, Kit smoke 9.2 min, kitless smoke 7.0 min. Those parent timings include the RTX exclusions; the child description links validation with all cases enabled.
Validation
At
824fcdbda6d, the originalbuild-kitlessjob is restored verbatim fromdevelop; its smoke consumer again depends on it and checks builder success. YAML validation, formatting/lint, commit hooks and merge/scope checks pass. This restoration changes only the MGPU workflow. Latestdevelopat953d0425d29, including the shared Isaac Sim 6.2 image update, is included.Current-head multi-GPU CI and Docker + Tests are running. The previous head passed all 26 required checks, ARM CI and MGPU coverage: 7 executed training cases plus 8 retained RTX xfails; all 36 unit files completed with 284 passes, 4 existing skips and no failures, unclaimed files or queue orphans. Those prior results do not validate this restored topology or the new base image. PR8280 remains on its previous parent until this head is validated.
Type of change
Release backport
developChecklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there