Repository navigation
[Tests] Make core unit tests device-aware - #7918
Conversation
|
run-ci |
|
| assert first is second | ||
|
|
||
| def test_cuda_array_interface(self): | ||
| @pytest.mark.parametrize("cuda_device", test_devices(DeviceScope.CUDA)) |
There was a problem hiding this comment.
These CUDA-only cases use cuda_device, but the multi-GPU shard selector only retains variants parametrized under the exact name device. Because this file is now auto-discovered for multi-GPU CI, every non-default-GPU variant of both tests is deselected, so the new device scope does not provide the intended CUDA coverage on those shards. Parametrize the existing device argument instead, as the other CUDA-scoped tests do.
There was a problem hiding this comment.
Isaac Lab Review Bot
The test-only change replaces hard-coded cuda:0 allocations with the repository’s centralized device selection in the Torch and ProxyArray suites, while retaining CUDA-only coverage through DeviceScope.CUDA. No actionable defects were identified.
- Design and architecture: The patch consistently reuses
test_devices()and scopes CUDA-specific ProxyArray tests separately instead of duplicating device-discovery logic. CPU-only runs can execute general coverage while CUDA-only parameter sets are skipped when unavailable. - API: No public or extension-facing API changes are introduced. Selected device strings are passed through existing Torch and Warp interfaces, and the empty
.skipchangelog fragment is appropriate for this test-portability change. - Implementation: The parametrized Torch operations and general ProxyArray tests use the selected device consistently. The CUDA array-interface and Warp-launch tests use a CUDA-only parameter set throughout allocation, launch, and synchronization, while the negative CPU test remains explicitly pinned to CPU. The submitted validation covers both CPU-only and normal device configurations.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
…7921) # Description Backports #7918 to `release/3.0.0`. This makes the core Torch and ProxyArray unit tests use Isaac Lab device selection instead of unconditionally allocating on `cuda:0`. CUDA-specific ProxyArray cases select from the CUDA device scope and skip cleanly when CUDA is unavailable, allowing downstream CPU-only package validation while preserving upstream CPU and CUDA coverage. The merged source commit `1089f000607dd24e61da4d3095a7e05880bac98b` cherry-picked cleanly onto release commit `be270ed88bbc0ea46201ce5cdd4cd0a502971cbc`. The backport validator confirms an exact three-file patch with no release-specific changes. ## Type of change - Bug fix (non-breaking test-portability change) ## Release backport This pull request targets `release/3.0.0` directly; no further backport is requested. ## Validation - Normal device selection: **93 passed**. - CPU-only mode with `CUDA_VISIBLE_DEVICES` empty and `ISAACLAB_TEST_DEVICES=100`: **60 passed, 2 skipped**. - `.github/scripts/backport.py validate-candidate --exact_patch`: passed. - Release-based changelog validation: passed. - `uv run --no-sync isaaclab -f`: all formatting, lint, metadata, and repository hooks passed. The changelog hook was run separately against `release/3.0.0` because its default base is `develop`. - `git diff --check`: passed. ## Screenshots Not applicable. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] Documentation changes are not required for this test-only backport - [x] My changes generate no new warnings - [x] I have preserved the tests that prove the behavior works - [x] The original changelog skip fragment is included - [x] My name already exists in `CONTRIBUTORS.md`
…7530, #7899) (#7926) ## Description Backports the two changes merged into `develop` since September 19 that are still missing from `release/3.0.0`: | Source PR | Change | Source commit | | --- | --- | --- | | #7530 | Validate camera outputs against renderer capabilities before simulator startup | `31d1c53510490c76841e9c35a329574b357d9900` | | #7899 | Share native resources by construction cfg and centralize ownership and teardown | `c90c3a1097a0a669a823b880b1c8d0654d7fd267` | Includes the original regression tests, API documentation, and changelog fragments. #7530 applied without changes. #7899 required two conflict resolutions to retain the release branch's OVRTX mapping API, documentation, and tests. Of its 62 files, 59 match the merged source exactly; the other three retain those existing release additions. Release versions, lockfile entries, compiled changelogs, and documentation routing are preserved. ## Audit Checked all **33 PRs** merged from September 19, 2026 00:00 America/Los_Angeles through `develop` commit `c90c3a1097` (September 20, 21:29 Pacific), against release base `75e9c8ce12`. **31 are already backported; the remaining two are included here.** Git first-parent history and GitHub's merged PR list agree. Automatic changelog/version compilation remains branch-specific. <details> <summary>31 PRs already recorded in release</summary> | Source PRs | Existing release commit | | --- | --- | | #7777, #7608, #7895, #7872, #7831, #7834, #7838, #7840, #7903, #7674 | [`ff22c52891`](ff22c52) | | #7886 | [`41bfaee5f0`](41bfaee) | | #7042 | [`970d21ef48`](970d21e) | | #7905 | [`f0563d1f9e`](f0563d1) | | #7604 | [`dca7cfe984`](dca7cfe) | | #7610, #7603 | [`5dd2220243`](5dd2220) | | #7839 | [`b8b93bb96e`](b8b93bb) | | #6851 | [`baa025ad90`](baa025a) | | #7250 | [`f86b33e6b1`](f86b33e) | | #7910 | [`24f7b4842b`](24f7b48) | | #7810 | [`9738e096c8`](9738e09) | | #7832 | [`be270ed88b`](be270ed) | | #4679 | [`80157aa22d`](80157aa) | | #7914 | [`01b59b5a22`](01b59b5) | | #7502 | [`db7db61f60`](db7db61) | | #7918 | [`bca9dba8bb`](bca9dba) | | #7919 | [`ef1514c97c`](ef1514c) | | #7922 | [`7d6979a19e`](7d6979a) | | #7923 | [`a1dd560b98`](a1dd560) | | #7924 | [`892e51dc1d`](892e51d) | | #7925 | [`75e9c8ce12`](75e9c8c) | </details> ## Validation **745 tests passed** on the combined backport: - Core registry, configclass, replication, camera contracts, and task presets: 158 passed. - Newton manager/model/reset and coupling suites: 299 passed. - OVPhysX/OVRTX lifecycle, scene data, bindings, and material contracts: 141 passed on CPU. - Clone-plan algebra: 83 passed. - All 8 OV CUDA cases skipped in the CPU run: 8 passed on GPU. - OVPhysX ray-caster regression: 1 passed. - Kit simulation-context and PhysX scene-data tests: 54 passed. - Newton solver reset integration: 1 passed. The registry-identity and borrowed-config-field regressions both fail with the pre-backport implementations and pass with this change. Backport file-scope validation, source-file comparison, `git diff --check`, and `uv run isaaclab -f` passed. Local validation used PyTorch 2.12.0/CUDA 13.0, Isaac Sim 6.0.1.0, Newton 1.6.0rc1, and an RTX 5090. Existing deprecation/runtime warnings occurred. Full Docker CI is requested separately against the pinned environment; local checks do not claim a startup or runtime speedup. ## Checklist - [x] Read the contribution guidelines and ran formatting/changelog checks. - [x] Included source tests, documentation, and changelog fragments. - [x] Verified regression behavior and preserved release-specific changes. - [x] Recorded source commit hashes and audited the requested merge window. --------- Co-authored-by: Antoine RICHARD <[email protected]> Co-authored-by: ooctipus <[email protected]>
Description
Makes the core Torch and ProxyArray unit tests use Isaac Lab's existing
test_devices()selection instead of unconditionally allocating oncuda:0. CUDA-specific ProxyArray coverage now selects from the CUDA device scope and skips cleanly when the active test runtime has no CUDA device.This lets downstream package maintainers run these unit tests against CPU-only installed packages while preserving CPU and CUDA coverage in upstream CI. It addresses the low-risk test-portability portion of #5084.
Type of change
Release backport
developScreenshots
Not applicable.
Validation
CUDA_VISIBLE_DEVICES='' ISAACLAB_TEST_DEVICES=100 uv run python -m pytest source/isaaclab/test/deps/test_torch.py source/isaaclab/test/utils/warp/test_proxy_array.py -q(60 passed, 2 skipped)uv run python -m pytest source/isaaclab/test/deps/test_torch.py source/isaaclab/test/utils/warp/test_proxy_array.py -q(93 passed)uv run python tools/changelog/cli.py check develop --include-worktreeuv run isaaclab -fChecklist
uv run isaaclab -fsource/isaaclab/changelog.d/CONTRIBUTORS.md