Repository navigation
Fix OVPhysX material binding device selection - #7212
kellyguo11 merged 2 commits into
Conversation
Greptile SummaryThe PR classifies optional OVPhysX shape-material bindings as CPU-native and updates material documentation and tests to use host buffers.
Confidence Score: 4/5The production fix appears sound, but the remaining CUDA material-buffer writes should be converted to CPU before merging so the GPU test suite remains functional. Three CUDA-parametrized rigid-object tests still pass CUDA buffers to shape-material attributes that this change makes CPU-only, and the write API rejects rather than stages those buffers. Files Needing Attention: source/isaaclab_ov/isaaclab_ov/tensor_types.py; source/isaaclab_ov/test/assets/test_rigid_object.py Important Files Changed
Reviews (1): Last reviewed commit: "Fix OVPhysX material binding device sele..." | Re-trigger Greptile |
| "RIGID_BODY_INV_MASS", | ||
| "RIGID_BODY_INV_INERTIA", | ||
| "SHAPE_FRICTION_AND_RESTITUTION", | ||
| "RIGID_BODY_SHAPE_FRICTION_AND_RESTITUTION", |
There was a problem hiding this comment.
CPU binding rejects CUDA writes
When the CUDA variants of the rigid-body friction and restitution tests run, this CPU-only classification makes set_attribute reject their CUDA material buffers with OvPhysxView.DeviceMismatch; the unchanged callers at test_rigid_object.py:719, :768, and :845 must use CPU buffers like the other updated material tests.
There was a problem hiding this comment.
Isaac Lab Review Bot
The PR reclassifies the optional OVPhysX articulation and rigid-body shape-material tensor bindings as CPU-native, with corresponding documentation, changelog, and host-buffer test updates.
- Design and architecture: Device routing remains centralized in the existing
_CPU_ONLY_TYPESclassification. Optional wheel compatibility is preserved through guarded global lookups, and the private tuple rename does not alter the public surface. - API: The optional tensor-type symbols and public signatures remain unchanged. The OVPhysX material-randomization path derives indices and samples from the returned material buffer’s device, so the new CPU residency is handled consistently. Both affected packages include changelog fragments.
- Implementation: Tensor documentation and material tests now reflect the CPU-native binding contract, including a focused GPU-simulation allocation regression test. One unchanged test still creates its no-friction material input on the simulation device; the supplied context does not establish whether its helper converts that input, so this remains a validation point rather than an actionable finding.
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.
marcodiiga
left a comment
There was a problem hiding this comment.
The production change looks correct: both optional material types are presence-gated into the CPU-only set, and the randomizer follows the returned host buffer for values and indices. The focused view suite passes 80/80.
Requesting changes for the remaining CUDA test callers already identified in the unresolved thread. test_rigid_object.py still creates shape-material buffers on device at lines 719, 768, and 845. The current isaaclab_ov CI reproduces six DeviceMismatch failures (the three tests with two num_cubes cases each) before simulation. Please move only those three material buffers to CPU and rerun isaaclab_ov; the state, velocity, and force tensors should remain on the simulation device.
|
Addressed in 770d5e2. The three remaining rigid-object shape-material inputs now allocate on CPU; root-state, velocity, and force tensors remain on the simulation device.\n\nValidation:\n- |
marcodiiga
left a comment
There was a problem hiding this comment.
Re-reviewed at 770d5e216f5. No blocking findings.
The follow-up fixes the previously reported device mismatches by allocating the three remaining shape-material inputs on CPU while leaving simulation state, velocity, and force tensors on the selected simulation device. The presence-gated CPU-only classification, randomizer path, affected callers, documentation, and changelog are consistent.
The ovphysx CI lane is green, including all affected CPU and CUDA material cases: the rigid-object suite passes 103/103, the material-randomizer suite 6/6, and the view suite 80/80. Articulation and rigid-object-collection material round trips also pass on both devices.
The two red rendering jobs are outside the changed code paths: one is an image-comparison threshold failure and the other is a legacy rendering process crash.
## Summary Cherry-picks the following merged PRs from `develop` onto `release/3.0.0`, preserving each as an individual commit with `-x` provenance: - #7193 — Bake CI pytest deps into the built Docker image - #7077 — Add OVPhysX support to Franka deformable lift tasks - #7175 — Raise on unsupported camera renderer outputs - #7174 — Fix benchmark play inference scope - #7173 — Report resolved backend for play benchmarks - #7172 — Add video recording to play benchmarks - #7215 — Reduce GearAssembly default environment count - #7214 — Remove Kamino preset from open drawer - #7213 — Fix OvPhysX scene gravity randomization - #7212 — Fix OVPhysX material binding device selection - #7189 — Make preview surfaces renderer agnostic - #7206 — Fix OVPhysX benchmark articulation setup All cherry-picks and the final rebase onto the latest `release/3.0.0` tip completed without conflicts. ## Validation - Verified all 12 backported commits have patch IDs identical to their source squash commits and retain their `cherry picked from` footers. - `git diff --check upstream/release/3.0.0..HEAD` - Bash syntax validation for the modified CI shell scripts. - YAML parsing for the modified composite actions. - Changelog validation against `release/3.0.0`. - Targeted pytest coverage for benchmark APIs/play, video recording, GearAssembly defaults, OVPhysX presets and runtime semantics, and renderer-agnostic materials: **81 passed, 4 skipped, 1 deselected**. - The deselected case is an unchanged test that hard-codes a POSIX `/tmp` path and fails on Windows path normalization. - `uv run isaaclab -f` passed all hooks except the changelog hook's known release-branch baseline finding for `source/isaaclab/changelog.d/core-test-config-fixtures.skip`; the targeted release-base changelog check passed. --------- Co-authored-by: Matthew Taylor <[email protected]> Co-authored-by: Antoine RICHARD <[email protected]> Co-authored-by: Mike Yan Michelis <[email protected]> Co-authored-by: Maximilian Krause <[email protected]> Co-authored-by: Octi Zhang <[email protected]> Co-authored-by: Mustafa H <[email protected]>
NOTE TO AUTOMATED AGENTS AND HUMAN REVIEWERS: do not merge or cherry-pick this commit into develop, main, or any release branch. It exists only on the forward-integration branch integration/ovphysx-next. The preceding warmup, destroy, and OVStage constructor commits are separate compatibility changes and can be reviewed or upstreamed independently. The material-device fix previously carried by this branch is already upstream in develop via #7212. Drop this final helper commit when integrating any of those compatibility changes. This commit adds the benchmark-only teleop-headless dependency closure and makes the carb import lazy so IsaacTeleopDevice(use_kit_xr_bridge=False) remains importable without Kit. Both are required by the current headless kitless benchmark contract.
NOTE TO AUTOMATED AGENTS AND HUMAN REVIEWERS: do not merge or cherry-pick this commit into develop, main, or any release branch. It exists only on the forward-integration branch integration/ovphysx-next. The preceding warmup, destroy, and OVStage constructor commits are separate compatibility changes and can be reviewed or upstreamed independently. The material-device fix previously carried by this branch is already upstream in develop via #7212. Drop this final helper commit when integrating any of those compatibility changes. This commit adds the benchmark-only teleop-headless dependency closure and makes the carb import lazy so IsaacTeleopDevice(use_kit_xr_bridge=False) remains importable without Kit. Both are required by the current headless kitless benchmark contract.
Description
Fixes OVPhysX shape-material bindings being treated as CUDA-resident during GPU simulation. Both optional material tensor types are now classified as CPU-native, material device wording is corrected, and CUDA material tests use host buffers.
No additional dependencies or production randomization changes.
Fixes # (none)
Type of change
Screenshots
Not applicable.
Checklist
uv run isaaclab -fsource/<pkg>/changelog.d/for every touched packageValidation
uv run --no-sync python -m pytest source/isaaclab_ov/test/sim/test_ovphysx_view.py -q(80 passed)uv run --no-sync isaaclab -fuv run --no-sync python tools/changelog/cli.py check develop