Skip to content

[Warp] Cleanup Part 5.1: Speed up launches outside graph capture with replay#6551

Closed
hujc7 wants to merge 5 commits into
isaac-sim:developfrom
hujc7:jichuanh/warp-launch-record-replay
Closed

[Warp] Cleanup Part 5.1: Speed up launches outside graph capture with replay#6551
hujc7 wants to merge 5 commits into
isaac-sim:developfrom
hujc7:jichuanh/warp-launch-record-replay

Conversation

@hujc7

@hujc7 hujc7 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

1. Summary

  • isaaclab: adds owner-scoped WarpLaunchCache, eager/replay A/B mode, debug pointer/layout validation, and a reproducible mixed-kernel benchmark.
  • isaaclab_experimental: converts persistent direct, manager, and MDP launch sites while retaining eager execution for transient allocations.
  • isaaclab_newton: adds default-off replay for validated pointer-stable articulation, rigid-object, derived-state, and actuator paths.
  • isaaclab_tasks_experimental: converts Cartpole, locomotion, Allegro in-hand, and manager-task hot paths.

The counterbalanced actual-environment grid measured Ant and Allegro Direct at
256, 1,024, 4,096, and 16,384 environments on four L40s:

Case Continuous-throughput result
Ant, 256 environments 1.06372x (+6.372%, descriptive 95% CI 1.03690–1.09124)
Ant, 1,024–16,384 environments effectively neutral once GPU busy reached 100%
Allegro, all four scales effectively neutral; GPU busy was already 100% at 256 environments

Per-step-synchronized diagnostics exposed roughly 65–106 us/step of removed
host launch overhead. The normal pipeline hides that saving behind queued GPU
work in saturated cases. The isolated launch ablation independently confirms
that graphs remain fastest for capture-safe regions and replay removes most
Warp Python marshalling from persistent uncaptured calls.

2. Design notes

  • Capture remains the primary fast path; replay targets Torch, host-control, visualization, sensor, and lazy-state gaps around legal graph islands.
  • The first call records and executes; later calls replay. Owners control lifetime and invalidation, with no caller warm-up branches, singleton, monkeypatch, or production ctypes path.
  • Recorded arguments require persistent storage and static scalar values; dimension changes use Warp's supported set_dim() path.
  • Ant replayed 7 of 20 non-noop launches per RL step; Allegro replayed 10 of 43. Remaining Newton forward, acceleration, reset, and actuator-telemetry launches explain the next optimization opportunities.
  • Runtime manager-term curriculum changes invalidate both graph and launch caches before the updated term is reused.

3. Test plan

  • 195 focused tests with replay debug validation.
  • Curriculum invalidation regression probe failed before the fix and passed after it, including the no-change path.
  • Direct Cartpole eager/replay training: five iterations, 20,480 samples per arm, exact learning-series and final-state equality.
  • Four-replica L40 application controls for natural partial-capture Allegro and Direct Cartpole, with exact replay-hit and graph-topology audits.
  • Eight-L40 isolated launch-path ablation for dispatch overhead; it is mechanism-only evidence and is not used to predict IsaacLab task throughput.
  • Counterbalanced Ant/Allegro Direct grid at 256–16,384 environments: 32/32 primary processes and 32/32 latency diagnostics passed topology, cache, telemetry, and source/configuration provenance validation.
  • Full pre-commit, docs build, four package changelog gates, and git diff --check.

4. Follow-ups

  • Productize replay for launch-bound uncaptured boundaries, while leaving capture as the preferred legal fast path.
  • Remove the Torch actuator graph break, preallocate actuator telemetry, deduplicate Newton forward/acceleration work, fuse adjacent kernels, and partition manager stages into larger legal graph islands.
  • Evaluate backend-owned full-decimation graphs in a separate semantic-change prototype; do not fold that behavior into this replay PR.

Type of change

  • New feature (non-breaking change)

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the pre-commit checks with ./isaaclab.sh -f.
  • I have added the corresponding API documentation and changelog fragments.
  • My changes generate no new warnings.
  • I have added tests that prove the feature works.
  • I have added one changelog fragment for every touched package.
  • My name already exists in CONTRIBUTORS.md.

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jul 15, 2026
hujc7 added 4 commits July 16, 2026 01:39
Provide an owner-scoped path for pointer-stable kernels that cannot stay inside CUDA graph regions. Preserve eager A/B mode and validate recorded storage contracts in debug builds.
Route persistent direct-task, MDP, and manager launches through environment-owned caches so uncapturable stages avoid eager marshalling on every kernel. Keep transient allocations eager.
Gate replay for validated pointer-stable articulation, rigid-object, derived-state, and actuator paths. Leave the feature disabled by default while broader workload coverage matures.
Add a reproducible mixed-kernel matrix and completed-step timing controls to compare eager launch, recorded replay, dynamic setters, and graph composition across launch and thread scales.
@hujc7
hujc7 force-pushed the jichuanh/warp-launch-record-replay branch from 2c874fe to fbe99e6 Compare July 16, 2026 08:41
@hujc7 hujc7 changed the title Add Warp launch record-and-replay cache [Warp] Speed up launches outside graph capture with replay Jul 16, 2026
Runtime manager-term updates can replace scalar or callable inputs that are baked into captured graphs and recorded launches. Invalidate the owner caches only when a curriculum actually writes a new value.
@hujc7 hujc7 changed the title [Warp] Speed up launches outside graph capture with replay [Warp] Cleanup Part 5.1: Speed up launches outside graph capture with replay Jul 21, 2026
@hujc7

hujc7 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #6611, which now absorbs everything from this PR on top of the simplified #6607 frontend: the owner-scoped WarpLaunchCache, the launch-mode benchmark harness, the default-off Newton deep-path replay (NewtonCfg.use_warp_launch_cache), and the curriculum cache-invalidation fix. Performance evidence and the mechanism ablation from this PR remain referenced in #6611's history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant