[Warp] Read parity fixture poses through the warp accessor - #7060
Conversation
The pose-command fixture reached numpy via .torch.cpu().numpy(), routing warp buffers through a torch view and a host copy to get data warp can hand back directly. .warp.numpy() is the accessor for that. Note that ProxyArray.numpy() is not equivalent: unknown attributes forward to the torch view, so it inherits torch's CPU-only restriction and raises on the cuda tensors these fixtures use. The UniformPoseCommand imports move to the top of the file; they were local without a cycle to justify it.
Reviewers have twice read the checked-in set as redundant with the sweep that produces it. The sweep reports what adapts today; the set records what must keep adapting, so a task losing support fails instead of quietly shrinking the computed answer. The comment stated what the set is and how to update it, but not that, and the rationale sat forty lines away in the module docstring.
There was a problem hiding this comment.
Isaac Lab Review Bot
This test-only follow-up changes the pose-command parity fixture to materialize NumPy arrays directly from Warp buffers, moves command imports to module scope, clarifies the purpose of the checked-in Warp task-support set, and adds the required skip changelog fragment.
- Design and architecture: Using the Warp accessor avoids routing Warp-owned buffers through an intermediate Torch view while retaining the fixture’s NumPy reference calculations. The module-scope imports are consistent with ordinary dependency usage in this helper.
- API: No public symbols, configuration fields, defaults, exports, or documented runtime behavior change. The helper continues producing a UniformPoseCommand with the same command-buffer shape and device behavior for existing test consumers.
- Implementation: The four accessor substitutions preserve the array dimensions used by body indexing and the NumPy quaternion and position calculations; CUDA data is still materialized on the host as required by NumPy, but without the intermediate Torch conversion path. No production implementation path is modified.
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.
Greptile SummaryThis PR updates pose-command parity fixtures to read CUDA-backed pose data directly through the Warp accessor and moves pose-command imports to module scope.
Confidence Score: 5/5The PR appears safe to merge, with no actionable defects identified in the changed test infrastructure. The direct Warp accessor returns the expected host-side pose shapes for the synchronized fixture buffers, and the import and documentation changes preserve existing test behavior. Important Files Changed
Reviews (1): Last reviewed commit: "Say why the warp-supported set is pinned..." | Re-trigger Greptile |
|
Backported to |
Addresses review comments on #6900. - The pose-command parity fixture reached numpy via `.torch.cpu().numpy()`, routing warp buffers through a torch view and a host copy to get data warp hands back directly. Now uses `.warp.numpy()`. - `UniformPoseCommand` imports moved to the top of the file; they were local without a cycle to justify it. `ProxyArray.numpy()` is not equivalent and was tried first: unknown attributes forward to the torch view, so it inherits torch's CPU-only restriction and raises on the cuda tensors these fixtures use. Not included, raised on #6900 and better handled separately: - Dropping the `_wp` suffix. `term_dones_wp` belongs to a family of six (`time_outs_wp`, `dones_wp`, `terminated_wp`, `_truncated_wp`, `_terminated_wp`, `_scratch_term_mask_wp`); renaming one leaves the package less consistent than it is now. A rename of the family, with deprecations, is its own change. - `wp.static` for the resolved threshold flags, and 2D/tiled rewrites of the reward kernels. Both are optimizations that change how the kernels are defined and warrant their own benchmarking. ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` Test plan: - [x] `pytest source/isaaclab_experimental/test/` — 205 passed, 1 skipped - [x] `uv run isaaclab -f` clean (cherry picked from commit 318abfd)
Addresses review comments on #6900.
.torch.cpu().numpy(), routing warp buffers through a torch view and a host copy to get data warp hands back directly. Now uses.warp.numpy().UniformPoseCommandimports moved to the top of the file; they were local without a cycle to justify it.ProxyArray.numpy()is not equivalent and was tried first: unknown attributes forward to the torch view, so it inherits torch's CPU-only restriction and raises on the cuda tensors these fixtures use.Not included, raised on #6900 and better handled separately:
_wpsuffix.term_dones_wpbelongs to a family of six (time_outs_wp,dones_wp,terminated_wp,_truncated_wp,_terminated_wp,_scratch_term_mask_wp); renaming one leaves the package less consistent than it is now. A rename of the family, with deprecations, is its own change.wp.staticfor the resolved threshold flags, and 2D/tiled rewrites of the reward kernels. Both are optimizations that change how the kernels are defined and warrant their own benchmarking.Release backport
developTest plan:
pytest source/isaaclab_experimental/test/— 205 passed, 1 skippeduv run isaaclab -fclean