Repository navigation
Optimize Newton Ant direct stepping - #6509
Closed
AntoineRichard wants to merge 1 commit into
Closed
AntoineRichard wants to merge 1 commit into
AntoineRichard wants to merge 1 commit into
Conversation
Fuse Ant task post-processing and keep reset selection on the device for the default Newton configuration. Remove redundant action, reset, joint-index, and inactive wrench work so direct stepping can benefit from Newton zero-copy state access.
This was referenced Jul 14, 2026
Collaborator
Author
AntoineRichard
added a commit
that referenced
this pull request
Jul 15, 2026
# Description Skips resetting inactive instantaneous-wrench composers in the Newton, PhysX, and OVPhysX articulation write paths. Newton and PhysX previously cleared all seven composer buffers on every physics substep even when no instantaneous wrench had been applied. Nsight attributed fourteen 442,368-byte clears per Ant environment step to this work on Newton. OVPhysX already avoids resets when neither composer is active; its guard removes the remaining redundant reset when only permanent wrenches are active. The active check preserves the existing reset after every applied instantaneous wrench. An inactive composer is already fully reset: construction and full reset both zero its five input and two output buffers, while every supported add or set operation marks it active. This is one focused slice of superseded Draft PR #6509 and is independent of benchmark PR #6474. ## Type of change - Bug fix (non-breaking performance fix) ## Validation - ./isaaclab.sh -p tools/changelog/cli.py check develop - ./isaaclab.sh -f before commit - ./isaaclab.sh -f after commit and before push - The Newton source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with ./isaaclab.sh --format - [x] Documentation changes are not required - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment for every touched package - [x] My name already exists in CONTRIBUTORS.md
AntoineRichard
added a commit
that referenced
this pull request
Jul 15, 2026
# Description Adds a protected DirectRLEnv reset hook that preserves the existing indexed reset behavior by default while allowing backend-native task implementations to complete reset processing from a device mask without materializing dynamic reset indices on the host. CUDA torch.nonzero compaction requires determining a dynamic output size and can synchronize the stream. The hook isolates that policy decision without changing existing DirectRLEnv task semantics. ManagerBasedRLEnv is intentionally not included. Its scene, event, recorder, curriculum, observation, action, reward, command, and termination reset contracts currently require compact environment IDs, so adding the same hook there would not yet provide a synchronization-free path. This is one focused slice of superseded Draft PR #6509 and is independent of benchmark PR #6474. ## Type of change - New feature (non-breaking protected extension point) ## Validation - ./isaaclab.sh -p tools/changelog/cli.py check develop - ./isaaclab.sh -f before commit - ./isaaclab.sh -f after commit and before push - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with ./isaaclab.sh --format - [x] Documentation changes are not required for this protected hook - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment for the touched package - [x] My name already exists in CONTRIBUTORS.md
matthewtrepte
pushed a commit
to matthewtrepte/IsaacLab
that referenced
this pull request
Aug 4, 2026
# Description Skips resetting inactive instantaneous-wrench composers in the Newton, PhysX, and OVPhysX articulation write paths. Newton and PhysX previously cleared all seven composer buffers on every physics substep even when no instantaneous wrench had been applied. Nsight attributed fourteen 442,368-byte clears per Ant environment step to this work on Newton. OVPhysX already avoids resets when neither composer is active; its guard removes the remaining redundant reset when only permanent wrenches are active. The active check preserves the existing reset after every applied instantaneous wrench. An inactive composer is already fully reset: construction and full reset both zero its five input and two output buffers, while every supported add or set operation marks it active. This is one focused slice of superseded Draft PR isaac-sim#6509 and is independent of benchmark PR isaac-sim#6474. ## Type of change - Bug fix (non-breaking performance fix) ## Validation - ./isaaclab.sh -p tools/changelog/cli.py check develop - ./isaaclab.sh -f before commit - ./isaaclab.sh -f after commit and before push - The Newton source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with ./isaaclab.sh --format - [x] Documentation changes are not required - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment for every touched package - [x] My name already exists in CONTRIBUTORS.md
matthewtrepte
pushed a commit
to matthewtrepte/IsaacLab
that referenced
this pull request
Aug 4, 2026
# Description Adds a protected DirectRLEnv reset hook that preserves the existing indexed reset behavior by default while allowing backend-native task implementations to complete reset processing from a device mask without materializing dynamic reset indices on the host. CUDA torch.nonzero compaction requires determining a dynamic output size and can synchronize the stream. The hook isolates that policy decision without changing existing DirectRLEnv task semantics. ManagerBasedRLEnv is intentionally not included. Its scene, event, recorder, curriculum, observation, action, reward, command, and termination reset contracts currently require compact environment IDs, so adding the same hook there would not yet provide a synchronization-free path. This is one focused slice of superseded Draft PR isaac-sim#6509 and is independent of benchmark PR isaac-sim#6474. ## Type of change - New feature (non-breaking protected extension point) ## Validation - ./isaaclab.sh -p tools/changelog/cli.py check develop - ./isaaclab.sh -f before commit - ./isaaclab.sh -f after commit and before push - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with ./isaaclab.sh --format - [x] Documentation changes are not required for this protected hook - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment for the touched package - [x] My name already exists in CONTRIBUTORS.md
AntoineRichard
added a commit
that referenced
this pull request
Sep 8, 2026
# Description Reduces common Direct Locomotion task overhead used by Ant and Humanoid without introducing the experimental Ant post-step path. The change: - stages effort targets once per environment step because articulation command buffers persist across decimation substeps; - uses the cached all-joint target path instead of repeatedly uploading joint indices; - keeps scalar zero assignments on-device; - removes a duplicate articulation reset already performed by the scene reset; - removes redundant clones after advanced indexing; and - uses the common fused joint-state writer provided by PhysX, Newton, and Isaac Lab OV. The isolated device scalar change improved the Ant host-return measurement from 3.433 ms to 3.231 ms. The remaining changes remove repeated launches, index transfers, copies, and reset writes; the larger fused post-step and device-mask work is deliberately excluded. This is one focused slice of superseded Draft PR #6509 and is independent of benchmark PR #6474. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `uv run python tools/changelog/cli.py check develop` - `uv run --frozen isaaclab -f` - `uv run --frozen --extra test python -m pytest source/isaaclab_tasks/test/core/test_environments_newton.py -k 'Direct and (Ant or Humanoid)' -q` (`2 passed`) - Verified the fused writer interface on PhysX, Newton, and Isaac Lab OV. - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [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 `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation (not required for this internal performance fix) - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
isaaclab-bot Bot
pushed a commit
that referenced
this pull request
Sep 8, 2026
# Description Reduces common Direct Locomotion task overhead used by Ant and Humanoid without introducing the experimental Ant post-step path. The change: - stages effort targets once per environment step because articulation command buffers persist across decimation substeps; - uses the cached all-joint target path instead of repeatedly uploading joint indices; - keeps scalar zero assignments on-device; - removes a duplicate articulation reset already performed by the scene reset; - removes redundant clones after advanced indexing; and - uses the common fused joint-state writer provided by PhysX, Newton, and Isaac Lab OV. The isolated device scalar change improved the Ant host-return measurement from 3.433 ms to 3.231 ms. The remaining changes remove repeated launches, index transfers, copies, and reset writes; the larger fused post-step and device-mask work is deliberately excluded. This is one focused slice of superseded Draft PR #6509 and is independent of benchmark PR #6474. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `uv run python tools/changelog/cli.py check develop` - `uv run --frozen isaaclab -f` - `uv run --frozen --extra test python -m pytest source/isaaclab_tasks/test/core/test_environments_newton.py -k 'Direct and (Ant or Humanoid)' -q` (`2 passed`) - Verified the fused writer interface on PhysX, Newton, and Isaac Lab OV. - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [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 `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation (not required for this internal performance fix) - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there (cherry picked from commit 25fad3e)
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.
Summary
This Draft PR shows the code changes required to let
Isaac-Ant-Directbenefit from Newton zero-copy state access instead of spending most of the step in task orchestration.This is a fresh PR based directly on
develop. It does not modify or depend on #6474.Performance
RTX 5090, 4,096 environments, Newton/MJWarp, 100 warm-up steps, 1,000 measured steps, pre-generated seeded actions, with one device synchronization before and after the complete measured window:
Aggregate throughput improves from 1.312M to 3.007M env-steps/s. The optimized stable task reaches the same throughput class as the 2.98M env-steps/s experimental Warp/mask upper-bound task without substituting its different semantics.
Same-mode Nsight traces show:
cudaStreamSynchronize: 40 calls / 11.536 ms to zero;Semantic guards
compute_final_obs=False.ImplicitActuatorinstances, no Newton actuator adapter, no events or noise, and no reset rerendering.Type of change
Screenshots
Not applicable; this is a headless simulation performance change.
Validation
18 passedacross focused CPU/CUDA regression tests../isaaclab.sh -p tools/changelog/cli.py check developpassed../isaaclab.sh -fpassed after the final commit.Checklist
./isaaclab.sh -f.CONTRIBUTORS.md.