Fixes incorrect device being used when reordering arrays in RigidObjectCollection#4940
Merged
kellyguo11 merged 3 commits intoisaac-sim:developfrom Mar 11, 2026
Conversation
Contributor
Greptile SummaryThis PR fixes a device mismatch bug in Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant PhysX as PhysX (CPU)
participant Helper as _reshape_view_to_data_2d/3d
participant Warp as wp.array (strided view)
participant GPU as self.device (GPU)
PhysX->>Helper: get_masses() / get_inertias()<br/>(returns CPU wp.array)
Note over Helper: BEFORE FIX: device=self.device (GPU)<br/>→ CPU ptr labelled as GPU → crash on non-HMM
Helper->>Warp: wp.array(ptr=data.ptr, ..., device=data.device)<br/>Strided view stays on CPU
Warp->>GPU: wp.clone(strided_view, self.device)<br/>Contiguous copy + CPU→GPU transfer
GPU-->>Helper: Contiguous GPU wp.array
Last reviewed commit: 285a5c5 |
kellyguo11
approved these changes
Mar 11, 2026
daniela-hase
pushed a commit
to daniela-hase/IsaacLab
that referenced
this pull request
Mar 30, 2026
…ctCollection (isaac-sim#4940) # Description _reshape_view_to_data_2d/_3d created strided views with device=self.device (GPU) on pointers from CPU arrays. This could not be reproduced locally because our GPUs allowed for this using heterogeneous memory management, but the CI machine did no allow for this. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [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 - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Co-authored-by: Kelly Guo <kellyg@nvidia.com>
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.
Description
_reshape_view_to_data_2d/_3d created strided views with device=self.device (GPU) on pointers from CPU arrays.
This could not be reproduced locally because our GPUs allowed for this using heterogeneous memory management, but the CI machine did no allow for this.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there