Skip to content

Make the Warp frontend mask-first#6607

Draft
hujc7 wants to merge 4 commits into
isaac-sim:developfrom
hujc7:jichuanh/warp-frontend-cleanup
Draft

Make the Warp frontend mask-first#6607
hujc7 wants to merge 4 commits into
isaac-sim:developfrom
hujc7:jichuanh/warp-frontend-cleanup

Conversation

@hujc7

@hujc7 hujc7 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Made the experimental frontend Warp-first across commands, curricula, events, rewards, observations, terminations, and reset orchestration.
  • Standardized partial-reset selection on persistent boolean Warp masks through managers, scenes, and PhysX/Newton assets; compact IDs are created only for genuine host consumers.
  • Kept call sites mode-independent while making Warp eager the correctness-first default. Capture remains an explicit later optimization.

Why

The frontend still crossed between Warp masks, Torch index tensors, and stable-manager fallbacks in high-traffic paths. Those crossings complicated partial resets, introduced host synchronization and shared-state risks, and made graph correctness depend on mixed backend behavior.

This PR establishes the clean Warp-first baseline first: pointer-stable buffers, mask-owned reset state, Warp-native registered terms, and explicit compatibility boundaries.

Key design choices

  • Masks are canonical. Managers, scene elements, terrain updates, actuators, and external-wrench state consume boolean masks. IDs are materialized only for recorders, surface grippers, RTX reset work, or legacy ID-only terms.
  • Registered hot paths are Warp-native. This adds Warp uniform pose/velocity commands, a Warp curriculum manager, mask-native terrain/reward-weight curricula, and pointer-stable command/output buffers for locomotion and reach.
  • Execution policy stays centralized. Call sites pass the same callable and arguments; the existing dispatcher selects eager or graph execution. Stateful stages default to eager, and scene stages remain capped at eager.
  • Empty eager resets return early. One explicit host predicate avoids up to 54 launch-like no-op reset operations while retaining the Warp mask for every nonempty reset.
  • Compatibility remains explicit. Stable-manager selection is deprecated rather than removed, and public Lab actuator APIs are unchanged.
  • Newton-native actuators remain opt-in. Forcing them made representative Go2 physics substeps about 10x slower, so tasks retain their configured actuator path pending separate backend optimization.

The cleanup also fixes partial-reset correctness issues found during the work, including event-state leakage, center-of-mass sampling, termination metrics, dynamic reward weights, external-wrench selection, and identity quaternion initialization.

Performance

All measurements used one NVIDIA L40, seed 42, a serial process, Newton MJWarp physics graphs enabled, and the frontend explicitly in Warp eager mode.

Isolated develop comparison

Workload Envs Frames develop This PR Delta Peak GPU utilization
Go2 manager runtime 1,024 1,000 217,110 FPS 227,022 FPS +4.6% 61% -> 62%

Scaling chart

Cartpole is the upper line and Go2 is the lower line.

xychart-beta
    title "Warp-eager L40 throughput scaling"
    x-axis "Environments" [256, 1024, 4096]
    y-axis "Frames per second" 0 --> 1300000
    line [79521, 315642, 1248380]
    line [58942, 229836, 741682]
Loading
Task Envs Effective step FPS Peak GPU utilization
Cartpole Direct Warp 256 3.219 ms 79,521 23%
Cartpole Direct Warp 1,024 3.244 ms 315,642 23%
Cartpole Direct Warp 4,096 3.281 ms 1,248,380 25%
Go2 Flat Warp 256 4.343 ms 58,942 59%
Go2 Flat Warp 1,024 4.455 ms 229,836 63%
Go2 Flat Warp 4,096 5.523 ms 741,682 77%
Franka Reach Warp 1,024 3.826 ms 267,637 47%

Cartpole remains launch/CPU-bound across this range. Go2 shows the expected diminishing frontend headroom as GPU utilization rises from 59% to 77%.

Validation

  • 158 passed in the combined Warp/reset/manager/parity suite.
  • 3 passed in PhysX mask-forwarding coverage.
  • The empty-reset regression failed before the guard and passes afterward (9 passed in the reset-orchestration file).
  • Final-commit RSL-RL Cartpole training passed 5 iterations at 1,024 environments (Training time: 1.12 seconds).
  • All seven final L40 runtime cells completed successfully.
  • Full ./isaaclab.sh -f, changelog-fragment validation, and ./isaaclab.sh -d passed.

Follow-ups and limitations

  • The empty-reset predicate is an intentional host synchronization; it is currently much cheaper than dispatching the eager no-op pipeline.
  • Trainer action ingress and Torch observation outputs remain explicit public-interface boundaries.
  • Record/replay is next: prioritize repeated pointer-stable backend launches, eager manager loops, and lazy derived-state launches that cannot safely join a graph.
  • Capture comes last: enable it per stage only after stateful warm-up, pointer, and partial-reset semantics are validated. Manager capture remains available with MANAGER_CALL_CONFIG='{"default": 2}'; direct capture remains opt-in with ISAACLAB_WARP_DIRECT_CAPTURE=1.
  • The Newton-native actuator path needs separate profiling and optimization before becoming a frontend default.

Type of change

  • Bug fix (non-breaking 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 kept generated API documentation current and built it with ./isaaclab.sh -d.
  • My changes generate no new warnings.
  • I have added tests that prove the fixes and new behavior are effective.
  • I have added a changelog fragment for every touched package.
  • My name already exists in CONTRIBUTORS.md.

hujc7 added 4 commits July 19, 2026 03:20
Keep reset selection and registered manager hot paths on Warp-owned buffers, with explicit host boundaries only for legacy consumers. Default stateful frontend stages to eager execution so record/replay and capture can be layered on after correctness is established.
Preserve each task's configured actuator path instead of forcing the native Newton adapter in every Warp environment. The native path currently makes representative Go2 physics substeps roughly ten times slower, so it remains available for targeted validation without regressing the default frontend.
Keep reset masks canonical while using one explicit host predicate to avoid dispatching every reset manager for an empty selection. This recovers the eager hot path until recorded reset launches can remove the boundary.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jul 19, 2026
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