Repository navigation
Fix SkillGen quad mesh triangulation segfault with --device cpu - #8418
kellyguo11 merged 1 commit into
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Implementation (1). Other reviewed categories look good.
- PR description: The title and body match the diff and make no performance claim; add the exact
--device cpuregression command and before/after result to document validation. - Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: The new scope rebuilds the CUDA device from configuration instead of using
self.tensor_args.device, creating a second resolution owner; passstr(self.tensor_args.device)towp.ScopedDevice. - Style consistency: Style consistency looks good.
- Test quality: Test quality looks good.
Minor fixes needed. Posted 1 inline finding.
Automated review; human maintainers own approval decisions.
| # kernel on Warp's default device, which Isaac Lab sets to the sim device. With | ||
| # --device cpu this mismatch segfaults, so pin the default device to cuRobo's GPU | ||
| # while parsing the stage. | ||
| with wp.ScopedDevice(f"cuda:{self.config.cuda_device}"): |
There was a problem hiding this comment.
🟡 Warning · Implementation — Rebuilds device string instead of reusing tensor_args
self.tensor_args.device already owns the resolved device where cuRobo's arrays live (used at line 322). Re-deriving f"cuda:{self.config.cuda_device}" adds a second owner of device resolution that can diverge and reintroduce the mismatch. Use str(self.tensor_args.device).
|
| # kernel on Warp's default device, which Isaac Lab sets to the sim device. With | ||
| # --device cpu this mismatch segfaults, so pin the default device to cuRobo's GPU | ||
| # while parsing the stage. | ||
| with wp.ScopedDevice(f"cuda:{self.config.cuda_device}"): |
There was a problem hiding this comment.
Setting cuda_device=None now breaks planner initialization. This is a documented option, and the constructor resolves it to torch.cuda.current_device(). The new scope instead receives cuda:None, which is not a valid Warp device. Use the resolved self.tensor_args.device rather than formatting the raw config value.
| with wp.ScopedDevice(f"cuda:{self.config.cuda_device}"): | |
| with wp.ScopedDevice(str(self.tensor_args.device)): |
|
run-ci |
# Description cuRobo's quad-mesh triangulation (`curobo/util/usd_helper.py`) creates its Warp arrays on CUDA but calls `wp.launch()` without a device, so the kernel runs on Warp's default device. Since #7658, `SimulationContext` sets the Warp default device to the sim device, so `--device cpu` runs execute the CPU-compiled kernel against CUDA pointers. Fix: wrap the planner's `get_obstacles_from_stage()` call in `wp.ScopedDevice(f"cuda:{cuda_device}")` so cuRobo's deviceless launch lands on the device its arrays live on. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## 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] My changes generate no new warnings - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there (cherry picked from commit 2df15f9)
|
Backported to |
Description
cuRobo's quad-mesh triangulation (
curobo/util/usd_helper.py) creates its Warp arrays on CUDA but callswp.launch()without a device, so the kernel runs on Warp's default device. Since #7658,SimulationContextsets the Warp defaultdevice to the sim device, so
--device cpuruns execute the CPU-compiled kernel against CUDA pointers.Fix: wrap the planner's
get_obstacles_from_stage()call inwp.ScopedDevice(f"cuda:{cuda_device}")so cuRobo's deviceless launch lands on the device its arrays live on.Type of change
Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there