[FIX] Newton sensor CUDA graph capture fails on deformable geometry - #7567
[FIX] Newton sensor CUDA graph capture fails on deformable geometry#7567mmichelis wants to merge 1 commit into
Conversation
Greptile SummaryThis PR fixes Newton sensor CUDA graph capture for deformable geometry by replacing conditional task bodies with independently captured top-level graphs.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure remaining. Graph invalidation and publication keep the refit and task graph collections consistent, current callers request one registered task at a time, and capture failures retain the established eager-execution fallback. Important Files Changed
Sequence DiagramsequenceDiagram
participant S as Sensor caller
participant M as NewtonManager
participant B as BVH refit graph
participant T as Requested task graph
S->>M: update_sensor_tasks(name)
alt graphs not captured
M->>M: Warm up refit and registered tasks
M->>B: Capture top-level refit graph
loop Each registered task
M->>T: Capture independent top-level graph
end
end
opt Sensor state is dirty
M->>B: Launch refit graph
B-->>M: Updated query acceleration structures
end
M->>T: Launch graph for name
T-->>S: Updated sensor output
Reviews (1): Last reviewed commit: "Capture Newton scene-query tasks into pe..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The change replaces the conditional sensor pipeline with standalone BVH-refit and per-task CUDA graphs, directly addressing Warp’s restriction on allocations inside conditional graph bodies while preserving eager fallback and requested-task execution.
- Design and architecture: Per-task top-level graphs are a proportionate design for allocation-capable scene-query work. Scheduling and invalidation remain encapsulated in NewtonManager. The main non-blocking tradeoff is that graph count and launch count now scale with the number of registered sensor tasks.
- API: No public API is changed. The renamed graph state and invalidation methods are private implementation details, affected internal call sites and tests are updated consistently, and the isaaclab_newton changelog fragment documents the user-visible fix.
- Implementation: The refit-before-task ordering, dirty-state handling, all-or-nothing capture fallback, failure latch, and clear/reset paths are internally consistent. The CUDA regression test exercises standalone capture of an allocating wp.Mesh.refit task, while the existing combined renderer/raycast test is adapted to the per-task graph representation.
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.
Every registered scene-query task ran inside a wp.capture_if conditional body. CUDA forbids memory-allocation nodes there, and wp.Mesh.refit() allocates scratch on every call, so tasks with deformable geometry failed to capture and all sensor work fell back to eager execution. Capture the shared BVH refit and each task into their own top-level graph, where allocation nodes are legal. This preserves the previous per-task selection semantics and drops the device flag array and its per-call host-to-device copy.
57d7600 to
463ddce
Compare
Fixes nvbug 6675392.
Newton sensor CUDA graph capture fails on any task with deformable geometry, for example
Isaac-Lift-Cloth-Franka-Camera:NewtonManagerwrapped every registered scene-query task in awp.capture_ifconditional body. CUDA does not permit memory-allocation nodes inside a conditional body graph, andwp.Mesh.refit()allocates a scratch buffer on every call. Cloth reaches that call throughSensorTiledCamera.update->sync_transforms->RenderContext.update->_sync_triangle_mesh, so capture fails and all sensor work falls back to eager execution. Rigid-only camera tasks are unaffected becausewp.Bvh.refit()does not allocate.The shared BVH refit and each scene-query task are now captured into their own top-level graph, where allocation nodes are legal.
_update_sensor_taskslaunches the refit graph when the state is dirty and then the graph of each requested task. This preserves the previous per-task selection semantics and removes the device flag array along with its per-call host-to-device copy.The failure was not fatal, so it only ever surfaced as a logged traceback while training continued.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/isaaclab_newton/changelog.d/