Skip to content

feat: GPU-accelerated FrameView local poses + a new xform_space_writer API - #5677

Merged
pv-nvidia merged 55 commits into
isaac-sim:developfrom
pv-nvidia:pv/fabric-local-poses
Jul 7, 2026
Merged

pv-nvidia merged 55 commits into
isaac-sim:developfrom
pv-nvidia:pv/fabric-local-poses

Conversation

@pv-nvidia

@pv-nvidia pv-nvidia commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Fast GPU pose/scale ops on Fabric + a new writer-scope API

What this does

Two things:

  1. Local-space pose and scale ops are now GPU-fast on the Fabric backend.
    They go through the same Warp-kernel path that world-space ops already used.
    The old USD fallback for local-space is ~100× slower (see the table below).

  2. All transform writes go through a small context manager. You open a
    scope, do your writes inside it, and the scope handles the cleanup:

    with view.xform_world_space_writer() as writer:
        writer.set_poses(positions=p, orientations=o)
        writer.set_scales(scales=s)

    Use view.xform_local_space_writer() for local-space writes.

Builds on Piotr's prototype at
bareya/pbarejko/camera-update.

Why a scope?

A FrameView keeps two copies of each prim's transform in Fabric storage:
the omni:fabric:worldMatrix and omni:fabric:localMatrix attributes.
When you write one, the other has to be recomputed so they stay
consistent.

Without a scope, that recompute has to run after every single write. With
a scope, it runs once, when the scope closes. You can call set_poses
and set_scales as many times as you want inside the scope; on exit, one
Warp kernel derives the other space and one wp.synchronize() runs.
Empty scopes cost nothing.

The scope also pauses Fabric Hierarchy's transform-change tracking
while you're writing, then restores it on exit. (Fabric itself is just
the data store; Fabric Hierarchy, exposed through USDRT's
IFabricHierarchy, is the plugin that watches writes to
omni:fabric:localMatrix / omni:fabric:worldMatrix and keeps them
mutually consistent across the hierarchy.) Its tracking is pull-based:
a per-attribute listener records writes into a changelog, and the
plugin drains and processes that changelog on the next call to
IFabricHierarchy::update_world_xforms(). Pausing the listener does
not block the writes themselves — they still land in Fabric storage —
it just keeps them out of the changelog. With the changelog empty, the
next tick has nothing to "catch up on" for these prims, and can't
decide one of the two spaces is canonical and derive the other from
it. See the next section for why that matters.

Rules:

  • Only one writer can be open on a view at a time. Opening a second one
    raises RuntimeError.
  • While a writer is open, the view's own getters (get_world_poses, etc.)
    raise. Read through the writer (writer.get_poses()) inside the scope,
    or close the scope first.
  • Do not advance the simulation or render from inside the scope.
    No sim.step(), no world.render(), no SimulationApp.update().
    The matrices are mid-write until exit, and rendering against that state
    would read torn data. Keep scopes short and close them before stepping.
  • If something raises inside the scope (a user-code bug, a notebook
    cell interrupt, etc.), the scope still runs the opposite-space recompute
    on exit so the world and local matrices stay consistent prim-by-prim.
    The partial write itself is not rolled back — if you need
    all-or-nothing, snapshot the matrices yourself before entering.

Why we have to coordinate with Fabric Hierarchy (renderer correctness)

A writer scope is synchronous Python code, so the renderer can't see
anything mid-scope — no tick runs until we exit. The risk is on the
next render/sim tick after the scope closes.

On that next tick, Fabric Hierarchy runs its
IFabricHierarchy::update_world_xforms() step, which can recompute
omni:fabric:worldMatrix from omni:fabric:localMatrix (or vice
versa). If it thinks one of the two was the user's most recent edit,
it derives the other from it; the derived value — not what we wrote —
is then what the Fabric Scene Delegate (FSD) hands to RTX on the
render path.

Three things in this PR keep that next-tick recompute from clobbering our
work:

  1. Opposite-space derive at scope exit. By the time the scope closes,
    omni:fabric:worldMatrix and omni:fabric:localMatrix are mutually
    consistent prim-by-prim, so any recompute Fabric Hierarchy does is a
    no-op.

  2. Fabric-Hierarchy change tracking is paused for the whole scope.
    The writer calls track_local_xform_changes(False) and
    track_world_xform_changes(False) on enter (saving the prior state)
    and restores them on exit. While tracking is paused, the listeners
    don't record our writes in their changelog, so when the next tick
    runs there's nothing for update_world_xforms() to "catch up on".

  3. Two persistent selections with explicit read-only / read-write
    flags.
    Outside the scope, the view's selection is fully read-only —
    both omni:fabric:worldMatrix and omni:fabric:localMatrix are
    flagged RO. Inside the scope, the writer flips to a fully read-write
    selection.

    _sel_ro :  worldMatrix=RO, localMatrix=RO   (steady state, between writes)
    _sel_rw :  worldMatrix=RW, localMatrix=RW   (active during a writer scope)
    

    Both selections are built once when the view is initialized and kept
    alive for its lifetime. The writer scope flips a single flag (_is_rw)
    on enter/exit; nothing is rebuilt. The RO steady state tells Fabric
    Hierarchy's next-tick update_world_xforms() that no attribute is
    user-authored, so it leaves both alone.

Backend support

  • Fabric (PhysX): the fast GPU path described above.
  • USD, Newton, OVPhysX: the writer is a thin wrapper. Writes go straight
    to the backend's existing storage. No batching, no extra recompute (there
    is no second matrix to keep in sync). Same API across all four backends.

Newton has two different "scale" ideas, and the API keeps them apart:

  • NewtonSiteFrameView.set_scales(...) (deprecated) writes the Newton
    collision-shape geometry
    size.
  • The writer's set_scales(...) writes per-site transform scale,
    matching what USD FrameView does.

They operate on different state and are not merged.

API changes

New (recommended):

  • view.xform_world_space_writer() / view.xform_local_space_writer() —
    a context manager with set_poses, set_scales, get_poses,
    get_scales.

Deprecated (still works, warns once per class on first use):

  • set_world_poses / set_local_poses — use the writer scope.
  • get_scales / set_scales — use get_local_scales /
    get_world_scales, or the writer's set_scales.

Benchmark (1024 prims, 50 iterations, Blackwell RTX PRO 5000)

Per-iteration timings (lower is better):

Operation USD (ms) Fabric (ms) Newton Site (ms)
Get World Poses 8.6148 0.0375 0.0307
Set World Poses 19.1357 0.1090 0.0368
Get Local Poses 5.9556 0.0374 0.0497
Set Local Poses 7.9794 0.0979 0.0790
Get World Scales 13.1193 0.0371 0.0015
Set World Scales 21.4571 0.1014 0.0612
Get Local Scales 3.2544 0.0375 0.0022
Set Local Scales 3.8350 0.0937 0.0587
Get Both (World+Local) 14.7506 0.0738 0.1302
Interleaved World Set→Get 28.1046 0.1432 0.1588
Per-iter total 126.2 0.77 0.61

Speedup vs USD (per-iter ops; one-time view construction excluded):

Operation Fabric × Newton Site ×
Get World Poses 229.6× 280.2×
Set World Poses 175.6× 519.8×
Get Local Poses 159.0× 119.9×
Set Local Poses 81.5× 101.0×
Get World Scales 353.9× 8911.5×
Set World Scales 211.6× 350.4×
Get Local Scales 86.8× 1489.9×
Set Local Scales 40.9× 65.4×
Get Both (World+Local) 200.0× 113.3×
Interleaved World Set→Get 196.2× 177.0×
Overall (per-iter) 164× 207×

One-time view construction (reported separately, not part of the per-iter total): USD 4.6 ms, Fabric 4.4 ms, Newton Site 1013 ms — the Newton number is dominated by stage population on the first call. Steady-state per-iteration cost is what the speedup row reflects.

Notes for reviewers

  • Getters call wp.synchronize() before returning, so the returned
    ProxyArray is always immediately readable from both GPU and host
    code — no caller-side sync needed. (Both the cached and the
    per-indices paths sync; this used to be asymmetric.)

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels May 18, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Code Review Update

Review of new commits: PR was rebased and expanded since last review.
Previously reviewed: b15d6235 | Now reviewing: 80838c00

Summary

The PR has been expanded from 5 to 6 commits, adding Fabric-accelerated get/set_local_poses:

  1. Service locator infrastructure on SimulationContext
  2. Service locator tests + changelog
  3. Indexed Fabric transform kernels in isaaclab.utils.warp.fabric
  4. FabricStageCache as a shared hierarchy handle
  5. (NEW) Merge commit to consolidate branches
  6. (NEW) FabricFrameView rewrite with get/set_local_poses + dirty tracking

✅ New Additions Since Last Review

  • Fabric-accelerated local poses: set_local_poses / get_local_poses now use wp.indexedfabricarray to read/write omni:fabric:localMatrix directly on the GPU
  • Bidirectional world↔local sync:
    • set_world_poses → recomputes localMatrix via _sync_local_from_world()
    • set_local_poses → marks _world_dirty, world recomputed on next get_world_poses
  • Per-view dirty tracking: _world_dirty flag is instance-scoped, so concurrent views on the same stage don't clear each other's flag
  • Parent matrix handling: _build_parent_indexed_array() + _compute_parent_fabric_indices() for parent world matrix lookups
  • Topology-adaptive: PrepareForReuse() calls + _rebuild_trans_ro_arrays() for automatic recovery
  • Comprehensive tests: 13 new integration tests covering local/world consistency, rotated/scaled parents, multi-view isolation

🔧 Remaining Observations

[Minor] Index array dtype mismatch still present

The kernels declare indices: ArrayUInt32, but _compute_fabric_indices() returns dtype=wp.int32:

# fabric_frame_view.py
return wp.array(indices, dtype=wp.int32, device=self._device)

Warp will silently cast, so this works in practice. Suggestion: switch to dtype=wp.uint32 for consistency with the kernel signatures. Not blocking.

[Minor] Undefined buffer references in get_local_poses

get_local_poses references self._fabric_local_translations_buf and self._fabric_local_orientations_buf:

if use_cached:
    translations_wp = self._fabric_local_translations_buf
    orientations_wp = self._fabric_local_orientations_buf

These don't appear to be initialized in _initialize_fabric(). Verify these buffers are created alongside the existing world-pose buffers.

📋 Architecture Notes

The world↔local propagation design is clean:

  • Write world → update local: _sync_local_from_world() runs update_indexed_local_matrix_from_world kernel immediately after world writes
  • Write local → lazy world update: _world_dirty flag defers update_indexed_world_matrix_from_local until the next world read

This asymmetry makes sense: world writes are typically followed by physics steps (which don't need locals), while local writes are often followed by world reads for rendering.

📋 Verdict

LGTM — the new local-pose acceleration is a significant feature addition. The bidirectional sync logic is well-designed, and the test coverage is comprehensive (33 test functions across all new modules). The minor dtype observation from the previous review remains, plus one potential undefined buffer issue to double-check.


Automated review by isaaclab-review-bot • Reviewed at 80838c00

@isaaclab-review-bot isaaclab-review-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Code Review Update

Review of new commits: PR was rebased and expanded since last review.
Previously reviewed: eb5582ec | Now reviewing: 9ff3155

Summary

This PR delivers a well-architected feature: GPU-accelerated local-pose operations for FabricFrameView. The implementation is comprehensive and addresses the core limitation where local poses previously fell back to USD round-trips.

✅ Strengths

1. Clean Architecture

  • FabricStageCache provides shared hierarchy handles via the service locator pattern, avoiding per-view duplication
  • Three persistent selections (trans_sel_ro, world_sel_rw, local_sel_rw) cleanly separate read vs. write access patterns
  • Factory dispatch in FrameView._get_backend() correctly routes to UsdFrameView when Fabric is unavailable

2. Robust World↔Local Consistency

  • Bidirectional dirty tracking: set_local_poses marks _world_dirty, deferred until next world read
  • _sync_local_from_world() / _sync_world_from_local_if_dirty() keep matrices consistent
  • Per-view dirty flags prevent concurrent views from clearing each other's pending syncs

3. Topology-Adaptive Design

  • PrepareForReuse() + lazy array rebuild in _get_*_array() handles Fabric memory layout changes
  • _rebuild_trans_ro_arrays() consolidates index and indexed-array refresh

4. Excellent Test Coverage

  • 13+ new integration tests covering rotated parents, scaled parents, multi-view isolation
  • test_set_local_then_get_world_with_rotated_parent validates transpose-convention correctness
  • test_multi_view_per_view_dirty_isolation catches per-stage vs. per-view flag bugs

🔧 Minor Observations

[Minor] Index array dtype mismatch

_compute_fabric_indices() returns dtype=wp.int32, but kernels declare indices: ArrayUInt32:

return wp.array(indices, dtype=wp.int32, device=self._device)

Warp silently casts, so this works. Suggestion: use dtype=wp.uint32 for consistency with kernel signatures. Not blocking.

[Nit] Docstring transpose-convention note

The docstrings for update_indexed_local_matrix_from_world and update_indexed_world_matrix_from_local explain the transpose identity well. Consider adding a brief note that this relies on Fabric's row-major storage convention for future maintainers.

[Style] Empty sentinel shape

_fabric_empty_2d_array_sentinel uses shape (0, 0):

self._fabric_empty_2d_array_sentinel = wp.zeros((0, 0), dtype=wp.float32, device=self._device)

This is fine since the kernels gate on shape[0] > 0, but (0, 3) or (0, 4) might be slightly more self-documenting for unused position/quaternion slots.

📋 Architecture Notes

The asymmetric sync strategy is well-reasoned:

  • Write world → sync local immediately: _sync_local_from_world() runs right after world writes because downstream code (e.g., rendering) typically reads locals soon after
  • Write local → lazy world sync: _world_dirty flag defers the world = parent * local kernel until the next world read, avoiding unnecessary computation when multiple local writes occur before a world read

📋 CI Status

CI checks are currently pending. The pre-commit and changelog checks have passed.

📋 Verdict

LGTM — This is a significant feature addition that completes the Fabric acceleration story for FabricFrameView. The bidirectional sync logic is sound, test coverage is thorough, and the codebase is well-documented. The minor dtype observation is non-blocking.


Automated review by isaaclab-review-bot • Reviewed at 9ff31550


Update (d13ed999→7f1a012c): Reviewed large incremental batch (50+ files changed). This batch contains no changes to the core FabricFrameView implementation — the Fabric local-poses feature code is identical to the previously reviewed state.

Key changes in this batch (all outside the PR's core feature scope):

  1. isaaclab_ppisp made fully optional: All packages (isaaclab_physx, isaaclab_newton, isaaclab_ov, isaaclab_ovphysx) removed hard isaaclab_ppisp from dependencies. Lazy try/except ModuleNotFoundError with _raise_missing_ppisp_error() helper provides actionable install hints only when isp_cfg is actually set. Clean pattern, consistently applied.

  2. Cloner refactoring to ReplicateContext classes: physx_replicate, newton_physics_replicate, and ovphysx_replicate legacy functions now delegate to new PhysxReplicateContext, NewtonReplicateContext, and OvPhysxReplicateContext classes. Asset constructors call queue_*_replication(cfg) to register on REPLICATION_QUEUE. Well-structured — separates queueing from execution, enables batched replication.

  3. MJWarp ls_parallel deprecated: Config field emits DeprecationWarning via __post_init__(), _build_solver() ignores it. Removed from all test configurations.

  4. Newton manager lifecycle fix: close() now calls super().close() before cls.clear(), ensuring sensor invalidation callbacks fire while Newton state is still alive, preventing stale registrations leaking.

  5. OvPhysX/OVRTX runtime guards: import_ovphysx() helper with actionable install messages, ovphysx==0.4.13 pin.

  6. PhysxManager rigid body view: Now detects name collisions between rigid and non-rigid prims (e.g., JointWrenchSensor frame prim vs. rigid link with same name) and uses exact paths for ambiguous names.

  7. Version bumps and changelog consolidation: All changelog fragment files moved into proper versioned CHANGELOG.rst entries.

Previous inline comments status:

  • ⏳ P1 (Missing wp.synchronize() in indexed getter paths): Still present — no changes to fabric_frame_view.py in this batch. Remains non-blocking per previous assessment.
  • ✅ P2 (Redundant kernel launch): Fixed in earlier commits (confirmed).

No new issues found in the incremental changes. All additions are well-implemented and follow established patterns. LGTM.


Automated incremental review by isaaclab-review-bot • Reviewed at 7f1a012c


Update (7f1a012c→999cf3c6): Major architectural refactor reviewed.

Changes in this batch

The lazy dirty-flag mechanism (_DirtyFlag enum, _dirty field, _sync_*_if_dirty helpers, interleaved-write warning) has been removed entirely and replaced with a context-managed writer scope API (FrameViewSpaceWriterBase). This is a substantial and well-executed improvement:

  1. New xform_space_writer() context manager: Opens a scoped write session ("world" or "local"). On __exit__, derives the opposite-space matrices once via a single Warp kernel and calls wp.synchronize() once. Clean, predictable, no more subtle interleaving bugs.

  2. Single-active-writer invariant: Per-view lock prevents concurrent scopes — RuntimeError on double-entry. Well-tested.

  3. Hierarchy listener pause/restore: _FabricWriterMixin._enter_impl() pauses track_local_xform_changes / track_world_xform_changes during writes, restoring prior state on exit. Correctly handles pre-paused listeners (no accidental re-enable).

  4. Deprecated shims preserved: set_world_poses() / set_local_poses() remain as thin wrappers that open one-shot writer scopes internally + emit DeprecationWarning. Clean migration path.

  5. set_world_scales / set_local_scales removed (breaking): Since these were introduced in this release cycle without stable downstream users, removal without deprecation is appropriate. Changelog documents it.

  6. Test coverage: Comprehensive new tests for the writer contract — single-active invariant, derive-on-exit counting, empty-scope no-op, getter-raises-inside-scope, hierarchy tracking restore.

Previous comments status

  • ✅ P2 (Redundant kernel launch): Fixed — the _sync_fabric_from_usd_initial() path now only composes localMatrix then calls _recompute_world_from_local_all(). The redundant world compose is gone.
  • ⏳ P1 (Missing wp.synchronize() in indexed getter paths): Still present in the non-cached decompose paths. Remains non-blocking per previous assessment (callers on the same CUDA stream see correct ordering; only cross-stream or immediate .numpy() usage is affected).
  • ✅ Minor observations (dtype, docstring, sentinel shape): These were non-blocking nits and remain unchanged. The sentinel shape (0, 0) is now less relevant since it is only used internally by the writer compose kernel.

New observations

No new issues found. The architectural shift from lazy dirty-flag tracking to eager derive-on-scope-exit is a clear improvement in correctness and readability. The _FabricWriterMixin pattern cleanly separates Fabric lifecycle management from the write logic. LGTM.


Automated incremental review by isaaclab-review-bot • Reviewed at 999cf3c6

@pv-nvidia

Copy link
Copy Markdown
Contributor Author

Superseded by the consolidated PR #5728 (pv/fabric-full-stack).

@pv-nvidia pv-nvidia closed this May 22, 2026
@pv-nvidia pv-nvidia reopened this May 22, 2026
@pv-nvidia
pv-nvidia marked this pull request as ready for review May 25, 2026 18:05
@greptile-apps

greptile-apps Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Fabric-accelerated get/set_local_poses and a new get/set_local_scales / get/set_world_scales API across all BaseFrameView backends, replacing the ambiguous get/set_scales. A lazy dirty-flag mechanism (_DirtyFlag.WORLD/LOCAL) keeps world and local matrices consistent without eager syncs, and a wp.indexedfabricarray-based kernel suite handles GPU-side matrix operations.

  • FabricFrameView: new indexed Fabric kernels for local-pose roundtrips and world↔local propagation; dirty-flag, interleave detection, and topology-adaptive rebuild are all per-view.
  • All backends (UsdFrameView, OvPhysxFrameView, NewtonSiteFrameView): new get/set_local_scales / get/set_world_scales abstract implementations; get/set_scales deprecated to wrapper with warning.
  • Shared buffer issue: in FabricFrameView, get_world_scales(None) and get_local_scales(None) both write into the same _fabric_scales_buf, so calling them in sequence silently overwrites the first result — unlike get_world_poses/get_local_poses which use separate buffers.

Confidence Score: 4/5

Safe to merge after resolving the shared scales buffer in FabricFrameView; all other changes are correct and well-tested.

The core dirty-flag design, indexed kernel math, and world↔local propagation are sound and well-covered by the new test suite. The one functional defect is that get_world_scales and get_local_scales write into the same pre-allocated buffer, so calling both on the same view in sequence silently returns stale data from the second call in the first caller's handle — unlike the pose buffers which are correctly kept separate.

source/isaaclab_physx/isaaclab_physx/sim/views/fabric_frame_view.py — the shared _fabric_scales_buf between get_world_scales and get_local_scales needs a separate buffer per getter, mirroring the pose buffer pattern.

Important Files Changed

Filename Overview
source/isaaclab_physx/isaaclab_physx/sim/views/fabric_frame_view.py Core Fabric-accelerated view: adds get/set_local_poses, get/set_local_scales, get/set_world_scales with lazy dirty propagation. get_world_scales and get_local_scales share the same pre-allocated buffer, silently corrupting the first result when both are called in sequence.
source/isaaclab/isaaclab/utils/warp/fabric.py New indexed Fabric kernels for decompose/compose and world-local propagation; matrix math (transpose-storage convention) appears correct for both kernel pairs.
source/isaaclab/isaaclab/sim/views/base_frame_view.py Adds abstract get/set_local_scales and get/set_world_scales; promotes get_scales/set_scales to deprecated wrappers. Class-level warning flags suppress deprecation warnings process-wide after the first call.
source/isaaclab/isaaclab/sim/views/usd_frame_view.py Implements get/set_local_scales and get/set_world_scales for the USD backend. set_world_scales divides by parent scale without guarding against zero, which silently produces inf/NaN.
source/isaaclab_newton/isaaclab_newton/sim/views/newton_site_frame_view.py Adds get/set_local_scales and get/set_world_scales (both delegate to shape_scale as Newton does not distinguish); wraps return in ProxyArray; clean.
source/isaaclab_ovphysx/isaaclab_ovphysx/sim/views/ovphysx_frame_view.py Thin delegation to UsdFrameView for all new scale methods; straightforward and consistent with prior delegation pattern.
source/isaaclab_physx/test/sim/test_views_xform_prim_fabric.py Substantial new test coverage: local-pose roundtrips, dirty-flag isolation, interleave warning, rotated-parent correctness, scaled-parent seeding. No test covers calling get_world_scales followed by get_local_scales on the same view.
source/isaaclab/test/sim/frame_view_contract_utils.py Adds shared contract tests for local/world scales across all backends; covers round-trips, default identity, and ProxyArray return type.

Sequence Diagram

sequenceDiagram
    participant User
    participant FFV as FabricFrameView
    participant Kernel as Warp Kernels
    participant Fabric as Fabric (GPU)

    Note over FFV: _dirty = NONE (initial)

    User->>FFV: set_local_poses(translations, orientations)
    FFV->>FFV: _sync_world_from_local_if_dirty() [no-op]
    FFV->>Kernel: compose_indexed_fabric_transforms(localMatrix)
    Kernel->>Fabric: write localMatrix
    FFV->>FFV: "_dirty = WORLD"

    User->>FFV: get_world_poses()
    FFV->>FFV: _sync_world_from_local_if_dirty() [fires]
    FFV->>Kernel: update_indexed_world_matrix_from_local
    Kernel->>Fabric: "worldMatrix = parentWorld x childLocal"
    FFV->>FFV: "_dirty = NONE"
    FFV->>Kernel: decompose_indexed_fabric_transforms(worldMatrix)
    FFV-->>User: (positions, orientations)

    User->>FFV: set_world_scales(scales)
    FFV->>FFV: _sync_world_from_local_if_dirty() [no-op]
    FFV->>Kernel: compose_indexed_fabric_transforms(worldMatrix, scale only)
    Kernel->>Fabric: RMW worldMatrix scale
    FFV->>FFV: "_dirty = LOCAL"

    User->>FFV: get_local_scales()
    FFV->>FFV: _sync_local_from_world_if_dirty() [fires]
    FFV->>Kernel: update_indexed_local_matrix_from_world
    Kernel->>Fabric: "localMatrix = inv(parentWorld) x childWorld"
    FFV->>FFV: "_dirty = NONE"
    FFV->>Kernel: decompose_indexed_fabric_transforms(localMatrix)
    FFV-->>User: ProxyArray(scales)
Loading

Reviews (2): Last reviewed commit: "feat: add tests for world and local scal..." | Re-trigger Greptile

Comment on lines +384 to +387
if use_cached:
wp.synchronize()
return self._fabric_local_translations_ta, self._fabric_local_orientations_ta
return ProxyArray(translations_wp), ProxyArray(orientations_wp)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing wp.synchronize() in indexed (non-cached) getter path

When indices is provided, the Warp kernel is launched but control returns to the caller before the GPU has finished writing. Callers that immediately do .numpy() or wp.to_torch() on the returned ProxyArray can read stale zeros. The cached path (lines 384-386) correctly calls wp.synchronize() before returning, proving this is an oversight rather than intentional. The same issue exists in get_world_poses (line 292) and get_scales (line 473), but this PR introduces the new get_local_poses Fabric path — all three non-cached returns should add a wp.synchronize() call.

Comment on lines +723 to +738
# Compose into child worldMatrix.
wp.launch(
kernel=fabric_utils.compose_indexed_fabric_transforms,
dim=self.count,
inputs=[
self._world_ifa,
_to_float32_2d(pos_ta.warp),
_to_float32_2d(ori_ta.warp),
_to_float32_2d(scales_wp),
False,
False,
False,
self._view_indices,
],
device=self._device,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Redundant kernel launch for child worldMatrix

The compose kernel here writes the child worldMatrix using pos_ta (world pos), ori_ta (world ori) and scales_wp (local scale, not world scale). The scale is already wrong for a parent with non-unit scale, but more critically _recompute_world_from_local() at line 812 immediately overwrites the result of this launch with parent_world × child_local. The first kernel launch can be removed entirely — only the localMatrix compose (lines 743-757) and the parent worldMatrix compose are load-bearing before _recompute_world_from_local().

@pv-nvidia
pv-nvidia marked this pull request as draft May 29, 2026 12:52
@pv-nvidia pv-nvidia self-assigned this Jun 3, 2026
@pv-nvidia
pv-nvidia marked this pull request as ready for review June 3, 2026 13:16
@isaaclab-review-bot

Copy link
Copy Markdown
Contributor

🔄 Incremental Review Update

Reviewing new commits: 48e9a083 → 3376c5a88
Previous review: #4329309662

Summary

This batch completes the Fabric-accelerated local-pose implementation. The core feature is production-ready.

✅ Verified in New Commits

FabricFrameView local-pose operations (GPU-accelerated):

  • set_local_poses() / get_local_poses() now operate directly on omni:fabric:localMatrix via wp.indexedfabricarray
  • Bidirectional lazy dirty tracking (_DirtyFlag enum): setters flip flags, getters trigger deferred sync only when needed
  • Interleave detection with one-time warning when mixing set_world_poses and set_local_poses on the same view
  • New Warp kernels: compose_indexed_fabric_transforms, decompose_indexed_fabric_transforms, update_indexed_world_matrix_from_local, update_indexed_local_matrix_from_world

Scale API redesign:

  • Explicit get/set_local_scales() and get/set_world_scales() across all backends
  • Old get/set_scales() deprecated with one-time DeprecationWarning
  • Scale getters return ProxyArray (consistent with pose getters)

Test coverage:

  • Removed test_set_world_updates_local xfail override — contract test now passes ✅
  • Added: test_set_local_via_fabric_path, rotated-parent transpose verification, scaled-parent seeding, multi-view dirty isolation, local/world scale roundtrips, scaled-parent USD conversions

📋 Previous Inline Comments Status

Priority Issue Status
P2 Redundant kernel launch in _sync_fabric_from_usd_initial() ✅ Fixed
P1 Missing wp.synchronize() in indexed getter paths ⏳ Still present (non-blocking)

P1 note: get_world_poses, get_local_poses, get_world_scales, and get_local_scales still lack wp.synchronize() before returning when indices is provided (cached path synchronizes correctly). Per design docs, callers using indexed getters are expected to understand Warp's async kernel execution. Consider adding a docstring note for clarity.

📋 Minor Observations (Unchanged, Non-blocking)

  • _compute_fabric_indices() returns dtype=wp.int32 but kernels expect ArrayUInt32 (Warp silently casts)
  • _fabric_empty_2d_array_sentinel shape (0, 0) could be (0, 3) for clarity

✅ Verdict

LGTM — No new issues found. Core feature is complete with excellent test coverage.


Automated review by isaaclab-review-bot • Reviewed at 3376c5a8

@pv-nvidia
pv-nvidia requested a review from xyao-nv as a code owner June 9, 2026 19:29
@github-actions github-actions Bot added the isaac-mimic Related to Isaac Mimic team label Jun 9, 2026
@pv-nvidia pv-nvidia changed the title feat: Fabric-accelerated get/set_local_poses via indexedfabricarray feat: GPU-accelerated FrameView local poses + xform_space_writer API Jun 22, 2026
@pv-nvidia pv-nvidia changed the title feat: GPU-accelerated FrameView local poses + xform_space_writer API feat: GPU-accelerated FrameView poses + a new xform_space_writer API Jun 22, 2026
@pv-nvidia pv-nvidia changed the title feat: GPU-accelerated FrameView poses + a new xform_space_writer API feat: GPU-accelerated FrameView local poses + a new xform_space_writer API Jun 23, 2026
…pagation

Add Warp kernels that operate on wp.indexedfabricarray for direct
local↔world matrix propagation without round-tripping through USD:

- decompose_indexed_fabric_transforms: extract pos/quat/scale from ifa
- compose_indexed_fabric_transforms: write pos/quat/scale into ifa
- update_indexed_local_matrix_from_world: local = inv(parent) * world
- update_indexed_world_matrix_from_local: world = parent * local

Also refactor existing kernels to use wp.where (branchless) instead of
if/else for broadcast index selection.

These kernels are the foundation for Fabric-accelerated get/set_local_poses
in FabricFrameView.
- Replace indexedfabricarray hacks with plain wp.array(dtype=wp.mat44d) test kernels
- Test kernels mirror production math: local^T = world^T * inv(parent^T)
- Add 5 tests for world↔local transforms including non-orthogonal/sheared cases
- All tests run on CPU without USDRT/Fabric runtime
- Convert existing class-based tests to plain functions (IsaacLab guideline)
- Add _local_from_world() and _world_from_local() as @wp.func
- Production fabric kernels delegate to these shared funcs
- Test kernels import and call the same funcs via wp.array adapters
- Zero copy-pasted math: tests exercise identical code paths as production
- Add _local_from_world_transposed() and _world_from_local_transposed() as @wp.func
  (names make explicit they operate on transposed storage matrices)
- Production fabric kernels delegate to these shared funcs
- Test kernels import and call the same funcs via wp.array adapters
- Remove __all__ (not an IsaacLab convention)
- Remove importability/export tests (unnecessary)
- Remove batch test (Warp handles batching)
- Add inline det != 0 assertions to world↔local tests
The world-body fallback in NewtonSiteFrameView._resolve_source_prim resolved
the reference prim directly from source_root, instead of stripping the
clone-template suffix as the prior code did. For heterogeneous (multi-asset
spawner) scenes this resolved the wrong reference frame, offsetting site world
poses and breaking rendering-correctness (dexsuite kuka hetero kitless).

Restore the split_clone_template/get_suffix-based ref_path computation (and the
dropped imports). Homogeneous scenes were unaffected; hetero rgb/depth now
match golden images again.

# -- get_world_scales ----------------------------------------------
if is_newton:
torch.cuda.synchronize()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use wp.synchronize directly here instead of torch

DeprecationWarning,
stacklevel=2,
)
with self.xform_world_space_writer() as writer:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think forcing users to apply the scope could be extra complexity burden on the users. what if we don't deprecate these APIs so that users can still use them if they want to, but we still update our examples to use the scopes so that we get the performance benefit? so we leave both options available, depending on whether users want extra performance / more code complexity or code simplicity / possibly lower perf

@pv-nvidia
pv-nvidia merged commit 69888c3 into isaac-sim:develop Jul 7, 2026
37 checks passed
hujc7 added a commit to hujc7/IsaacLab that referenced this pull request Jul 7, 2026
Reconcile against the split-out changes that have since merged:
- Drop the renderer-pinning ISAACLAB_PIN_KIT_GPU block and its changelog
  fragment; superseded by isaac-sim#5933 (default one-GPU + ISAACLAB_FABRIC_USE_GPU_INTEROP).
- Drop the inline newton_manager.py torch/Warp device pins and take develop's
  version; superseded by isaac-sim#6322 (centralized set_cuda_device + ScopedCapture(device=device)).
- Resolve test_views_xform_prim_fabric.py: keep develop's isaac-sim#5677/isaac-sim#5380 test
  bodies, retain the device_scope test_devices() parametrization.
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…r API (isaac-sim#5677)

# Fast GPU pose/scale ops on Fabric + a new writer-scope API

## What this does

Two things:

1. **Local-space pose and scale ops are now GPU-fast on the Fabric
backend.**
They go through the same Warp-kernel path that world-space ops already
used.
The old USD fallback for local-space is ~100× slower (see the table
below).

2. **All transform writes go through a small context manager.** You open
a
   scope, do your writes inside it, and the scope handles the cleanup:

   ```python
   with view.xform_world_space_writer() as writer:
       writer.set_poses(positions=p, orientations=o)
       writer.set_scales(scales=s)
   ```

   Use `view.xform_local_space_writer()` for local-space writes.

Builds on Piotr's prototype at

[`bareya/pbarejko/camera-update`](https://github.com/bareya/IsaacLab/tree/pbarejko/camera-update).

## Why a scope?

A FrameView keeps two copies of each prim's transform in Fabric storage:
the `omni:fabric:worldMatrix` and `omni:fabric:localMatrix` attributes.
When you write one, the other has to be recomputed so they stay
consistent.

Without a scope, that recompute has to run after every single write.
With
a scope, it runs **once**, when the scope closes. You can call
`set_poses`
and `set_scales` as many times as you want inside the scope; on exit,
one
Warp kernel derives the other space and one `wp.synchronize()` runs.
Empty scopes cost nothing.

The scope also pauses **Fabric Hierarchy**'s transform-change tracking
while you're writing, then restores it on exit. (Fabric itself is just
the data store; Fabric Hierarchy, exposed through USDRT's
`IFabricHierarchy`, is the plugin that watches writes to
`omni:fabric:localMatrix` / `omni:fabric:worldMatrix` and keeps them
mutually consistent across the hierarchy.) Its tracking is pull-based:
a per-attribute listener records writes into a changelog, and the
plugin drains and processes that changelog on the next call to
`IFabricHierarchy::update_world_xforms()`. Pausing the listener does
not block the writes themselves — they still land in Fabric storage —
it just keeps them out of the changelog. With the changelog empty, the
next tick has nothing to "catch up on" for these prims, and can't
decide one of the two spaces is canonical and derive the other from
it. See the next section for why that matters.

Rules:
- Only one writer can be open on a view at a time. Opening a second one
  raises `RuntimeError`.
- While a writer is open, the view's own getters (`get_world_poses`,
etc.)
raise. Read through the writer (`writer.get_poses()`) inside the scope,
  or close the scope first.
- **Do not advance the simulation or render from inside the scope.**
  No `sim.step()`, no `world.render()`, no `SimulationApp.update()`.
The matrices are mid-write until exit, and rendering against that state
would read torn data. Keep scopes short and close them before stepping.
- If something raises inside the scope (a user-code bug, a notebook
cell interrupt, etc.), the scope still runs the opposite-space recompute
  on exit so the world and local matrices stay consistent prim-by-prim.
  The partial write itself is not rolled back — if you need
  all-or-nothing, snapshot the matrices yourself before entering.

## Why we have to coordinate with Fabric Hierarchy (renderer
correctness)

A writer scope is synchronous Python code, so the renderer can't see
anything mid-scope — no tick runs until we exit. The risk is on the
**next** render/sim tick after the scope closes.

On that next tick, Fabric Hierarchy runs its
`IFabricHierarchy::update_world_xforms()` step, which can recompute
`omni:fabric:worldMatrix` from `omni:fabric:localMatrix` (or vice
versa). If it thinks one of the two was the user's most recent edit,
it derives the other from it; the derived value — not what we wrote —
is then what the **Fabric Scene Delegate (FSD)** hands to RTX on the
render path.

Three things in this PR keep that next-tick recompute from clobbering
our
work:

1. **Opposite-space derive at scope exit.** By the time the scope
closes,
   `omni:fabric:worldMatrix` and `omni:fabric:localMatrix` are mutually
   consistent prim-by-prim, so any recompute Fabric Hierarchy does is a
   no-op.

2. **Fabric-Hierarchy change tracking is paused for the whole scope.**
   The writer calls `track_local_xform_changes(False)` and
   `track_world_xform_changes(False)` on enter (saving the prior state)
   and restores them on exit. While tracking is paused, the listeners
   don't record our writes in their changelog, so when the next tick
   runs there's nothing for `update_world_xforms()` to "catch up on".

3. **Two persistent selections with explicit read-only / read-write
   flags.** Outside the scope, the view's selection is fully read-only —
   both `omni:fabric:worldMatrix` and `omni:fabric:localMatrix` are
   flagged RO. Inside the scope, the writer flips to a fully read-write
   selection.

   ```
_sel_ro : worldMatrix=RO, localMatrix=RO (steady state, between writes)
_sel_rw : worldMatrix=RW, localMatrix=RW (active during a writer scope)
   ```

   Both selections are built once when the view is initialized and kept
alive for its lifetime. The writer scope flips a single flag (`_is_rw`)
   on enter/exit; nothing is rebuilt. The RO steady state tells Fabric
   Hierarchy's next-tick `update_world_xforms()` that no attribute is
   user-authored, so it leaves both alone.

## Backend support

- **Fabric (PhysX):** the fast GPU path described above.
- **USD, Newton, OVPhysX:** the writer is a thin wrapper. Writes go
straight
to the backend's existing storage. No batching, no extra recompute
(there
is no second matrix to keep in sync). Same API across all four backends.

Newton has two different "scale" ideas, and the API keeps them apart:

- `NewtonSiteFrameView.set_scales(...)` (deprecated) writes the **Newton
  collision-shape geometry** size.
- The writer's `set_scales(...)` writes per-site **transform scale**,
  matching what USD FrameView does.

They operate on different state and are not merged.

## API changes

**New (recommended):**
- `view.xform_world_space_writer()` / `view.xform_local_space_writer()`
—
  a context manager with `set_poses`, `set_scales`, `get_poses`,
  `get_scales`.

**Deprecated (still works, warns once per class on first use):**
- `set_world_poses` / `set_local_poses` — use the writer scope.
- `get_scales` / `set_scales` — use `get_local_scales` /
  `get_world_scales`, or the writer's `set_scales`.

## Benchmark (1024 prims, 50 iterations, Blackwell RTX PRO 5000)

Per-iteration timings (lower is better):

| Operation | USD (ms) | Fabric (ms) | Newton Site (ms) |

|----------------------------|---------:|------------:|-----------------:|
| Get World Poses | 8.6148 | 0.0375 | 0.0307 |
| Set World Poses | 19.1357 | 0.1090 | 0.0368 |
| Get Local Poses | 5.9556 | 0.0374 | 0.0497 |
| Set Local Poses | 7.9794 | 0.0979 | 0.0790 |
| Get World Scales | 13.1193 | 0.0371 | 0.0015 |
| Set World Scales | 21.4571 | 0.1014 | 0.0612 |
| Get Local Scales | 3.2544 | 0.0375 | 0.0022 |
| Set Local Scales | 3.8350 | 0.0937 | 0.0587 |
| Get Both (World+Local) | 14.7506 | 0.0738 | 0.1302 |
| Interleaved World Set→Get | 28.1046 | 0.1432 | 0.1588 |
| **Per-iter total** | **126.2** | **0.77** | **0.61** |

Speedup vs USD (per-iter ops; one-time view construction excluded):

| Operation                  | Fabric × | Newton Site × |
|----------------------------|---------:|--------------:|
| Get World Poses            |   229.6× |        280.2× |
| Set World Poses            |   175.6× |        519.8× |
| Get Local Poses            |   159.0× |        119.9× |
| Set Local Poses            |    81.5× |        101.0× |
| Get World Scales           |   353.9× |       8911.5× |
| Set World Scales           |   211.6× |        350.4× |
| Get Local Scales           |    86.8× |       1489.9× |
| Set Local Scales           |    40.9× |         65.4× |
| Get Both (World+Local)     |   200.0× |        113.3× |
| Interleaved World Set→Get  |   196.2× |        177.0× |
| **Overall (per-iter)**     | **164×** |       **207×** |

One-time view construction (reported separately, not part of the
per-iter total): USD 4.6 ms, Fabric 4.4 ms, Newton Site 1013 ms — the
Newton number is dominated by stage population on the first call.
Steady-state per-iteration cost is what the speedup row reflects.

## Notes for reviewers

- Getters call `wp.synchronize()` before returning, so the returned
  `ProxyArray` is always immediately readable from both GPU and host
  code — no caller-side sync needed. (Both the cached and the
  per-indices paths sync; this used to be asymmetric.)

---------

Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: pv-nvidia <{"message":"Not Found","documentation_url":"https://docs.github.com/rest/users/emails#list-email-addresses-for-the-authenticated-user","status":"404"}>
pbarejko pushed a commit that referenced this pull request Aug 7, 2026
)

# Description

Camera world-pose resolution stalled at high environment counts on the
PhysX backend, badly enough to time out benchmarks. There are two
independent bottlenecks; the PR also adds a lifecycle hook that came out
of review.

### 1. `FabricFrameView` resolved prim paths on the host, against the
whole stage

Cameras read their poses from Fabric. To do that the frame view needs to
know where each camera's data sits in Fabric memory, so it builds a
lookup table from "camera number" to "Fabric slot".

Building that table was very slow. The view selected prims by requiring
the Fabric world and local matrix attributes — but every xformable in
the stage carries those, so the selection matched the **entire stage**
(~1.1M prims at 8192 environments), not the view's handful of cameras.
Finding its own prims in that list then meant building a Python
dictionary over all of it, on the host:

```python
path_to_idx = {str(p): i for i, p in enumerate(selection.GetPaths())}
```

That ran twice per rebuild (once for the children, once for their
parents), and rebuilt whenever `PrepareForReuse()` reported a bucket
change — in practice on every environment reset.

The cost of that dictionary scales with the size of the whole scene, not
with the number of cameras: it converts every path in the stage to a
Python string and inserts it. Measured directly, one full rebuild takes
10 ms on a bare stage but **556 ms once 100k unrelated prims are
present** (table below), and it grows linearly from there — seconds of
host work per reset at the ~1.1M prims of an 8192-environment scene.

**Fix:** author a private per-view `uint` index attribute on each
managed prim (and on each unique parent), holding that prim's view
index. Every selection requires the matching index attribute, so
**selections resolve to exactly the view's prims**. The view-to-Fabric
slot mapping is then rebuilt by inverting that attribute in a single
Warp kernel launch:

```python
fabric_slots[view_indices[fabric_slot]] = fabric_slot
```

That is `O(view)` device work with no host-side path resolution and no
Python objects created per frame.

There is also **no cache**, so there is nothing to invalidate. The table
is rebuilt from live Fabric data on every access, which means a bucket
reorder can never leave a stale mapping behind. Selections are still
checked with `GetCount()`, which is exact here: the index attribute
belongs to one view, so the count can only change if one of that view's
prims actually disappeared — and then the view raises a clear error
instead of silently reading the wrong prim.

Attribute names embed a process-wide monotonic uid, so a dead view's
leftover attributes can never satisfy a live view's selection — and
since review, they are removed outright when the view is released
(section 3). Parent reads get their own read-only selection, keeping the
child RO/RW flip semantics from #5677 intact.

### 2. `SceneDataProvider.create_mapping` did a linear scan per item

```python
for i, path in enumerate(input_paths):
    mapping[i] = paths.index(path)   # O(N) scan, per path
```

**Fix:** build the reverse dict once (first occurrence wins, matching
`list.index` semantics), then resolve each path in `O(1)`. Measured over
200k paths, preserving first-occurrence semantics costs nothing versus
an unguarded dict comprehension, so the fix carries no behaviour change.

### 3. Index attributes are removed when a view is released (from
review)

The per-view index attributes from fix 1 were initially never removed,
so views recreated over the same prims on a long-lived stage accumulated
attribute pairs, widening those prims' Fabric buckets. Measured over 8
successive views on one stage (512 prims), attributes on a single prim
went 1 → 8 and first-access rose monotonically from 120 ms to 173 ms.

**Fix:** `FabricFrameView.close()` removes the view's tags (measured at
4.7 µs per prim, ~77 ms for an 8192-env view) and is safe to call more
than once. `BaseFrameView` gains a no-op `close()` so callers can close
any backend uniformly. Every in-repo callsite now closes its view:
`Camera` when invalidated **and when dropped** (`__del__`),
`prim_world_positions` after each per-env view it creates in a loop, and
`SceneAsset` before replacing its cached view. Views dropped without
`close()` are cleaned up best-effort from `__del__`, following the
shutdown-safe idiom the env classes already use (`sys` bound as a
default argument; nothing runs during interpreter finalization, where
Fabric dies with the process anyway), and a warning names the view so
the missing `close()` call can be fixed.

## How the problem was found

The stall was invisible in Tracy. Comparing captures before and after
the commit that introduced it, Kit's own per-frame work is unchanged —
`App Update` totals 65.1 s before and 62.3 s after, over ~120 frames.
All the lost time sits in the gaps *between* frames, where the main
thread is blocked in Python and Kit records nothing.

A `py-spy` capture found the cause: `_compute_fabric_indices_for`
accounted for **11.86% of samples (23.2 s of a 195 s run)**, reached
through `camera.reset()` → `get_world_poses()` → the selection rebuild.
Every frame on that chain carries essentially the same share, so the
whole cost is that one function.

Fixes nvbug 6535498.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality) —
`FrameView.close()`

## Benchmarks

### End-to-end symptom

Task `Isaac-Lift-KukaAllegro-Camera`, 8192 environments,
`presets=physx,isaacsim_rtx_renderer,duo_camera`. Commit `69888c34e471`
(which introduced the problem) against its parent `e5f99d320338`:

| | Parent | With the problem |
| --- | ---: | ---: |
| Mean environment step | 699 ms | 7193 ms |
| Slow steps (over 3 s) | 1 of 100 | 28 of 100, averaging 18.9 s |
| GPU utilization | 23.4% | 4.7% |

GPU and CPU utilization both drop during the slow steps, which is what a
stall looks like — the pipeline is waiting, not doing extra work.

With this PR, the same task at 8192 environments steps at **mean 1.554
s, peak 1.663 s** — peak within 7% of mean, i.e. the stalls are gone.
(Measured on an RTX A6000, so the absolute step time is not comparable
to the table above, which was captured on different hardware; the stall
signature is the comparison that matters.)

### Selection size — the actual fix

L40, `cuda:0`, 1024-prim view (1024 children + 1024 parents). "Filler"
is xformable prims **not** in the view but carrying Fabric matrices —
i.e. the rest of a real scene.

| filler prims | `develop` selection | this PR |
| ---: | ---: | ---: |
| 0 | 2,048 | 1,024 |
| 10,000 | 12,048 | 1,024 |
| 100,000 | 102,048 | **1,024** |

`develop` scales with the stage; this PR is pinned to the view.

### Slot-mapping rebuild (mean ms, the path hit on every reset)

| filler prims | `develop` child | `develop` parent | `develop` full RO
rebuild | PR child | PR parent |
| ---: | ---: | ---: | ---: | ---: | ---: |
| 0 | 4.67 | 5.40 | 10.24 | 0.137 | 0.191 |
| 10,000 | 24.05 | 24.69 | 62.47 | 0.139 | 0.193 |
| 100,000 | 274.21 | 270.47 | **556.41** | **0.137** | **0.190** |

`develop` grows linearly with stage size — **556 ms per rebuild** at
100k filler prims. This PR is flat at **~0.14 ms**, a **~2000×**
reduction, and unchanged from 0 to 100k filler prims. First access at
100k filler: 1824 ms → 383 ms.

### `create_mapping` (pure Python, reversed path order)

| N | `develop` | this PR | speedup |
| ---: | ---: | ---: | ---: |
| 1,000 | 0.0038 s | 0.0001 s | 27× |
| 5,000 | 0.0862 s | 0.0007 s | 120× |
| 20,000 | 1.3241 s | 0.0030 s | 434× |
| 50,000 | 8.5507 s | 0.0092 s | **929×** |
| 200,000 | (not run) | 0.0467 s | — |

Outputs verified identical at every N. At the ~200k rigid bodies of an
8192-environment scene the old path takes minutes.

## Tests

| Suite | Result |
| --- | --- |
| `isaaclab_physx/test/sim/test_views_xform_prim_fabric.py` | 79 passed,
4 skipped (`cpu` + `cuda:0` on an L40) |
| `isaaclab/test/sim/test_views_xform_prim.py` (USD contract) | 63
passed |
| `isaaclab_newton/test/sim/test_views_xform_prim_newton.py` | 58 passed
|
| `isaaclab/test/sensors/test_camera.py` (main consumer, incl. the new
`close()` call) | 35 passed, 0 missing-`close()` warnings |
| `isaaclab/test/utils/warp/test_proxy_array.py` | 81 passed |

New tests:

- `test_selections_match_only_the_view_prims` asserts each selection
matches exactly the prims the view manages. Verified to fail without the
fix — with the selections unscoped it reports `matched 8 prims, expected
4`, because the child selections pick up the parents too.
- `test_close_removes_index_attributes` asserts the tag-scoped selection
drops to zero after `close()` and that a second `close()` is a no-op.
- `test_garbage_collection_removes_index_attributes_and_warns` asserts a
view dropped without `close()` still removes its tags on collection and
logs the warning.

`test_fabric_rebuild_after_topology_change` was updated to drive the new
refresh paths instead of the removed `_rebuild_{ro,rw}_arrays`.

The 4 skips are environmental: empty device parameter sets, and Fabric
hierarchy bindings that are unavailable in a headless experience.

**Coverage gap:** `test_physx_scene_data_backend.py` and
`test_ovphysx_scene_data_backend.py` both skip at collection on the
machine used here, so the `create_mapping` change is exercised only by
the standalone benchmark above, not by the test suite. Worth a look in
CI, where those backends are available.

## Screenshots

Not applicable — no visual change. The benchmarks above cover the
behaviour change.

## Notes for reviewers

**Review feedback addressed so far:** the index-attribute accumulation
is fixed by `close()` (section 3); the opposite-space recompute no
longer refreshes the same selection twice on writer-scope exit;
`create_mapping` keeps `list.index`'s first-occurrence semantics for
duplicate paths (measured free at 200k paths); and docstrings/changelogs
were trimmed to the observable contract.

**The `isaaclab`/`isaaclab_physx` changelog fragments are still named
`fix-physx-newton-camera-pose-scaling.rst`**, inherited from #6554 —
nothing here touches Newton or scaling. The new `isaaclab_mimic`
fragment uses the branch slug. Happy to rename if reviewers prefer.

**A handful of tests still drop views without `close()`** and now log
the new warning during runs; harmless, cleanup to follow.

EDIT: fixed — the only remaining warning is the one
`test_garbage_collection_removes_index_attributes_and_warns` asserts on.
`Camera` previously closed its view only on invalidation, so a dropped
camera still went through `__del__`; it now closes in `Camera.__del__`
too. `test_camera.py` went from 3 warnings to 0.

## Relationship to #6554

#6554 found the same two slow paths. This PR takes its
`SceneDataProvider` fix unchanged (credited with a `Co-authored-by`
line) and replaces its Fabric frame view fix.

#6554 kept the whole-stage selection and the Python dictionary, and
cached the result, reusing it while the number of selected prims stayed
the same. Two problems with that. The cache key is unsafe: an equal prim
count does not mean the prims or their order stayed the same, so after a
bucket reorder or a same-count membership change the cached indices
point at the wrong prims and cameras silently read another prim's
transform. And it treats the symptom — the underlying operation is still
proportional to the size of the whole scene, just performed less often.

Making the selection small removes the need for a cache at all, so both
problems go away.

## 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 added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: yts-nv <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
@pv-nvidia pv-nvidia mentioned this pull request Aug 9, 2026
7 tasks done
pv-nvidia added a commit to pv-nvidia/pv-isaac-lab that referenced this pull request Aug 27, 2026
…r API (isaac-sim#5677)

Two things:

1. **Local-space pose and scale ops are now GPU-fast on the Fabric
backend.**
They go through the same Warp-kernel path that world-space ops already
used.
The old USD fallback for local-space is ~100× slower (see the table
below).

2. **All transform writes go through a small context manager.** You open
a
   scope, do your writes inside it, and the scope handles the cleanup:

   ```python
   with view.xform_world_space_writer() as writer:
       writer.set_poses(positions=p, orientations=o)
       writer.set_scales(scales=s)
   ```

   Use `view.xform_local_space_writer()` for local-space writes.

Builds on Piotr's prototype at

[`bareya/pbarejko/camera-update`](https://github.com/bareya/IsaacLab/tree/pbarejko/camera-update).

A FrameView keeps two copies of each prim's transform in Fabric storage:
the `omni:fabric:worldMatrix` and `omni:fabric:localMatrix` attributes.
When you write one, the other has to be recomputed so they stay
consistent.

Without a scope, that recompute has to run after every single write.
With
a scope, it runs **once**, when the scope closes. You can call
`set_poses`
and `set_scales` as many times as you want inside the scope; on exit,
one
Warp kernel derives the other space and one `wp.synchronize()` runs.
Empty scopes cost nothing.

The scope also pauses **Fabric Hierarchy**'s transform-change tracking
while you're writing, then restores it on exit. (Fabric itself is just
the data store; Fabric Hierarchy, exposed through USDRT's
`IFabricHierarchy`, is the plugin that watches writes to
`omni:fabric:localMatrix` / `omni:fabric:worldMatrix` and keeps them
mutually consistent across the hierarchy.) Its tracking is pull-based:
a per-attribute listener records writes into a changelog, and the
plugin drains and processes that changelog on the next call to
`IFabricHierarchy::update_world_xforms()`. Pausing the listener does
not block the writes themselves — they still land in Fabric storage —
it just keeps them out of the changelog. With the changelog empty, the
next tick has nothing to "catch up on" for these prims, and can't
decide one of the two spaces is canonical and derive the other from
it. See the next section for why that matters.

Rules:
- Only one writer can be open on a view at a time. Opening a second one
  raises `RuntimeError`.
- While a writer is open, the view's own getters (`get_world_poses`,
etc.)
raise. Read through the writer (`writer.get_poses()`) inside the scope,
  or close the scope first.
- **Do not advance the simulation or render from inside the scope.**
  No `sim.step()`, no `world.render()`, no `SimulationApp.update()`.
The matrices are mid-write until exit, and rendering against that state
would read torn data. Keep scopes short and close them before stepping.
- If something raises inside the scope (a user-code bug, a notebook
cell interrupt, etc.), the scope still runs the opposite-space recompute
  on exit so the world and local matrices stay consistent prim-by-prim.
  The partial write itself is not rolled back — if you need
  all-or-nothing, snapshot the matrices yourself before entering.

correctness)

A writer scope is synchronous Python code, so the renderer can't see
anything mid-scope — no tick runs until we exit. The risk is on the
**next** render/sim tick after the scope closes.

On that next tick, Fabric Hierarchy runs its
`IFabricHierarchy::update_world_xforms()` step, which can recompute
`omni:fabric:worldMatrix` from `omni:fabric:localMatrix` (or vice
versa). If it thinks one of the two was the user's most recent edit,
it derives the other from it; the derived value — not what we wrote —
is then what the **Fabric Scene Delegate (FSD)** hands to RTX on the
render path.

Three things in this PR keep that next-tick recompute from clobbering
our
work:

1. **Opposite-space derive at scope exit.** By the time the scope
closes,
   `omni:fabric:worldMatrix` and `omni:fabric:localMatrix` are mutually
   consistent prim-by-prim, so any recompute Fabric Hierarchy does is a
   no-op.

2. **Fabric-Hierarchy change tracking is paused for the whole scope.**
   The writer calls `track_local_xform_changes(False)` and
   `track_world_xform_changes(False)` on enter (saving the prior state)
   and restores them on exit. While tracking is paused, the listeners
   don't record our writes in their changelog, so when the next tick
   runs there's nothing for `update_world_xforms()` to "catch up on".

3. **Two persistent selections with explicit read-only / read-write
   flags.** Outside the scope, the view's selection is fully read-only —
   both `omni:fabric:worldMatrix` and `omni:fabric:localMatrix` are
   flagged RO. Inside the scope, the writer flips to a fully read-write
   selection.

   ```
_sel_ro : worldMatrix=RO, localMatrix=RO (steady state, between writes)
_sel_rw : worldMatrix=RW, localMatrix=RW (active during a writer scope)
   ```

   Both selections are built once when the view is initialized and kept
alive for its lifetime. The writer scope flips a single flag (`_is_rw`)
   on enter/exit; nothing is rebuilt. The RO steady state tells Fabric
   Hierarchy's next-tick `update_world_xforms()` that no attribute is
   user-authored, so it leaves both alone.

- **Fabric (PhysX):** the fast GPU path described above.
- **USD, Newton, OVPhysX:** the writer is a thin wrapper. Writes go
straight
to the backend's existing storage. No batching, no extra recompute
(there
is no second matrix to keep in sync). Same API across all four backends.

Newton has two different "scale" ideas, and the API keeps them apart:

- `NewtonSiteFrameView.set_scales(...)` (deprecated) writes the **Newton
  collision-shape geometry** size.
- The writer's `set_scales(...)` writes per-site **transform scale**,
  matching what USD FrameView does.

They operate on different state and are not merged.

**New (recommended):**
- `view.xform_world_space_writer()` / `view.xform_local_space_writer()`
—
  a context manager with `set_poses`, `set_scales`, `get_poses`,
  `get_scales`.

**Deprecated (still works, warns once per class on first use):**
- `set_world_poses` / `set_local_poses` — use the writer scope.
- `get_scales` / `set_scales` — use `get_local_scales` /
  `get_world_scales`, or the writer's `set_scales`.

Per-iteration timings (lower is better):

| Operation | USD (ms) | Fabric (ms) | Newton Site (ms) |

|----------------------------|---------:|------------:|-----------------:|
| Get World Poses | 8.6148 | 0.0375 | 0.0307 |
| Set World Poses | 19.1357 | 0.1090 | 0.0368 |
| Get Local Poses | 5.9556 | 0.0374 | 0.0497 |
| Set Local Poses | 7.9794 | 0.0979 | 0.0790 |
| Get World Scales | 13.1193 | 0.0371 | 0.0015 |
| Set World Scales | 21.4571 | 0.1014 | 0.0612 |
| Get Local Scales | 3.2544 | 0.0375 | 0.0022 |
| Set Local Scales | 3.8350 | 0.0937 | 0.0587 |
| Get Both (World+Local) | 14.7506 | 0.0738 | 0.1302 |
| Interleaved World Set→Get | 28.1046 | 0.1432 | 0.1588 |
| **Per-iter total** | **126.2** | **0.77** | **0.61** |

Speedup vs USD (per-iter ops; one-time view construction excluded):

| Operation                  | Fabric × | Newton Site × |
|----------------------------|---------:|--------------:|
| Get World Poses            |   229.6× |        280.2× |
| Set World Poses            |   175.6× |        519.8× |
| Get Local Poses            |   159.0× |        119.9× |
| Set Local Poses            |    81.5× |        101.0× |
| Get World Scales           |   353.9× |       8911.5× |
| Set World Scales           |   211.6× |        350.4× |
| Get Local Scales           |    86.8× |       1489.9× |
| Set Local Scales           |    40.9× |         65.4× |
| Get Both (World+Local)     |   200.0× |        113.3× |
| Interleaved World Set→Get  |   196.2× |        177.0× |
| **Overall (per-iter)**     | **164×** |       **207×** |

One-time view construction (reported separately, not part of the
per-iter total): USD 4.6 ms, Fabric 4.4 ms, Newton Site 1013 ms — the
Newton number is dominated by stage population on the first call.
Steady-state per-iteration cost is what the speedup row reflects.

- Getters call `wp.synchronize()` before returning, so the returned
  `ProxyArray` is always immediately readable from both GPU and host
  code — no caller-side sync needed. (Both the cached and the
  per-indices paths sync; this used to be asymmetric.)

---------

Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: pv-nvidia <{"message":"Not Found","documentation_url":"https://docs.github.com/rest/users/emails#list-email-addresses-for-the-authenticated-user","status":"404"}>
pv-nvidia added a commit to pv-nvidia/pv-isaac-lab that referenced this pull request Aug 27, 2026
…aac-sim#6805)

Camera world-pose resolution stalled at high environment counts on the
PhysX backend, badly enough to time out benchmarks. There are two
independent bottlenecks; the PR also adds a lifecycle hook that came out
of review.

whole stage

Cameras read their poses from Fabric. To do that the frame view needs to
know where each camera's data sits in Fabric memory, so it builds a
lookup table from "camera number" to "Fabric slot".

Building that table was very slow. The view selected prims by requiring
the Fabric world and local matrix attributes — but every xformable in
the stage carries those, so the selection matched the **entire stage**
(~1.1M prims at 8192 environments), not the view's handful of cameras.
Finding its own prims in that list then meant building a Python
dictionary over all of it, on the host:

```python
path_to_idx = {str(p): i for i, p in enumerate(selection.GetPaths())}
```

That ran twice per rebuild (once for the children, once for their
parents), and rebuilt whenever `PrepareForReuse()` reported a bucket
change — in practice on every environment reset.

The cost of that dictionary scales with the size of the whole scene, not
with the number of cameras: it converts every path in the stage to a
Python string and inserts it. Measured directly, one full rebuild takes
10 ms on a bare stage but **556 ms once 100k unrelated prims are
present** (table below), and it grows linearly from there — seconds of
host work per reset at the ~1.1M prims of an 8192-environment scene.

**Fix:** author a private per-view `uint` index attribute on each
managed prim (and on each unique parent), holding that prim's view
index. Every selection requires the matching index attribute, so
**selections resolve to exactly the view's prims**. The view-to-Fabric
slot mapping is then rebuilt by inverting that attribute in a single
Warp kernel launch:

```python
fabric_slots[view_indices[fabric_slot]] = fabric_slot
```

That is `O(view)` device work with no host-side path resolution and no
Python objects created per frame.

There is also **no cache**, so there is nothing to invalidate. The table
is rebuilt from live Fabric data on every access, which means a bucket
reorder can never leave a stale mapping behind. Selections are still
checked with `GetCount()`, which is exact here: the index attribute
belongs to one view, so the count can only change if one of that view's
prims actually disappeared — and then the view raises a clear error
instead of silently reading the wrong prim.

Attribute names embed a process-wide monotonic uid, so a dead view's
leftover attributes can never satisfy a live view's selection — and
since review, they are removed outright when the view is released
(section 3). Parent reads get their own read-only selection, keeping the
child RO/RW flip semantics from isaac-sim#5677 intact.

```python
for i, path in enumerate(input_paths):
    mapping[i] = paths.index(path)   # O(N) scan, per path
```

**Fix:** build the reverse dict once (first occurrence wins, matching
`list.index` semantics), then resolve each path in `O(1)`. Measured over
200k paths, preserving first-occurrence semantics costs nothing versus
an unguarded dict comprehension, so the fix carries no behaviour change.

review)

The per-view index attributes from fix 1 were initially never removed,
so views recreated over the same prims on a long-lived stage accumulated
attribute pairs, widening those prims' Fabric buckets. Measured over 8
successive views on one stage (512 prims), attributes on a single prim
went 1 → 8 and first-access rose monotonically from 120 ms to 173 ms.

**Fix:** `FabricFrameView.close()` removes the view's tags (measured at
4.7 µs per prim, ~77 ms for an 8192-env view) and is safe to call more
than once. `BaseFrameView` gains a no-op `close()` so callers can close
any backend uniformly. Every in-repo callsite now closes its view:
`Camera` when invalidated **and when dropped** (`__del__`),
`prim_world_positions` after each per-env view it creates in a loop, and
`SceneAsset` before replacing its cached view. Views dropped without
`close()` are cleaned up best-effort from `__del__`, following the
shutdown-safe idiom the env classes already use (`sys` bound as a
default argument; nothing runs during interpreter finalization, where
Fabric dies with the process anyway), and a warning names the view so
the missing `close()` call can be fixed.

The stall was invisible in Tracy. Comparing captures before and after
the commit that introduced it, Kit's own per-frame work is unchanged —
`App Update` totals 65.1 s before and 62.3 s after, over ~120 frames.
All the lost time sits in the gaps *between* frames, where the main
thread is blocked in Python and Kit records nothing.

A `py-spy` capture found the cause: `_compute_fabric_indices_for`
accounted for **11.86% of samples (23.2 s of a 195 s run)**, reached
through `camera.reset()` → `get_world_poses()` → the selection rebuild.
Every frame on that chain carries essentially the same share, so the
whole cost is that one function.

Fixes nvbug 6535498.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality) —
`FrameView.close()`

Task `Isaac-Lift-KukaAllegro-Camera`, 8192 environments,
`presets=physx,isaacsim_rtx_renderer,duo_camera`. Commit `69888c34e471`
(which introduced the problem) against its parent `e5f99d320338`:

| | Parent | With the problem |
| --- | ---: | ---: |
| Mean environment step | 699 ms | 7193 ms |
| Slow steps (over 3 s) | 1 of 100 | 28 of 100, averaging 18.9 s |
| GPU utilization | 23.4% | 4.7% |

GPU and CPU utilization both drop during the slow steps, which is what a
stall looks like — the pipeline is waiting, not doing extra work.

With this PR, the same task at 8192 environments steps at **mean 1.554
s, peak 1.663 s** — peak within 7% of mean, i.e. the stalls are gone.
(Measured on an RTX A6000, so the absolute step time is not comparable
to the table above, which was captured on different hardware; the stall
signature is the comparison that matters.)

L40, `cuda:0`, 1024-prim view (1024 children + 1024 parents). "Filler"
is xformable prims **not** in the view but carrying Fabric matrices —
i.e. the rest of a real scene.

| filler prims | `develop` selection | this PR |
| ---: | ---: | ---: |
| 0 | 2,048 | 1,024 |
| 10,000 | 12,048 | 1,024 |
| 100,000 | 102,048 | **1,024** |

`develop` scales with the stage; this PR is pinned to the view.

| filler prims | `develop` child | `develop` parent | `develop` full RO
rebuild | PR child | PR parent |
| ---: | ---: | ---: | ---: | ---: | ---: |
| 0 | 4.67 | 5.40 | 10.24 | 0.137 | 0.191 |
| 10,000 | 24.05 | 24.69 | 62.47 | 0.139 | 0.193 |
| 100,000 | 274.21 | 270.47 | **556.41** | **0.137** | **0.190** |

`develop` grows linearly with stage size — **556 ms per rebuild** at
100k filler prims. This PR is flat at **~0.14 ms**, a **~2000×**
reduction, and unchanged from 0 to 100k filler prims. First access at
100k filler: 1824 ms → 383 ms.

| N | `develop` | this PR | speedup |
| ---: | ---: | ---: | ---: |
| 1,000 | 0.0038 s | 0.0001 s | 27× |
| 5,000 | 0.0862 s | 0.0007 s | 120× |
| 20,000 | 1.3241 s | 0.0030 s | 434× |
| 50,000 | 8.5507 s | 0.0092 s | **929×** |
| 200,000 | (not run) | 0.0467 s | — |

Outputs verified identical at every N. At the ~200k rigid bodies of an
8192-environment scene the old path takes minutes.

| Suite | Result |
| --- | --- |
| `isaaclab_physx/test/sim/test_views_xform_prim_fabric.py` | 79 passed,
4 skipped (`cpu` + `cuda:0` on an L40) |
| `isaaclab/test/sim/test_views_xform_prim.py` (USD contract) | 63
passed |
| `isaaclab_newton/test/sim/test_views_xform_prim_newton.py` | 58 passed
|
| `isaaclab/test/sensors/test_camera.py` (main consumer, incl. the new
`close()` call) | 35 passed, 0 missing-`close()` warnings |
| `isaaclab/test/utils/warp/test_proxy_array.py` | 81 passed |

New tests:

- `test_selections_match_only_the_view_prims` asserts each selection
matches exactly the prims the view manages. Verified to fail without the
fix — with the selections unscoped it reports `matched 8 prims, expected
4`, because the child selections pick up the parents too.
- `test_close_removes_index_attributes` asserts the tag-scoped selection
drops to zero after `close()` and that a second `close()` is a no-op.
- `test_garbage_collection_removes_index_attributes_and_warns` asserts a
view dropped without `close()` still removes its tags on collection and
logs the warning.

`test_fabric_rebuild_after_topology_change` was updated to drive the new
refresh paths instead of the removed `_rebuild_{ro,rw}_arrays`.

The 4 skips are environmental: empty device parameter sets, and Fabric
hierarchy bindings that are unavailable in a headless experience.

**Coverage gap:** `test_physx_scene_data_backend.py` and
`test_ovphysx_scene_data_backend.py` both skip at collection on the
machine used here, so the `create_mapping` change is exercised only by
the standalone benchmark above, not by the test suite. Worth a look in
CI, where those backends are available.

Not applicable — no visual change. The benchmarks above cover the
behaviour change.

**Review feedback addressed so far:** the index-attribute accumulation
is fixed by `close()` (section 3); the opposite-space recompute no
longer refreshes the same selection twice on writer-scope exit;
`create_mapping` keeps `list.index`'s first-occurrence semantics for
duplicate paths (measured free at 200k paths); and docstrings/changelogs
were trimmed to the observable contract.

**The `isaaclab`/`isaaclab_physx` changelog fragments are still named
`fix-physx-newton-camera-pose-scaling.rst`**, inherited from isaac-sim#6554 —
nothing here touches Newton or scaling. The new `isaaclab_mimic`
fragment uses the branch slug. Happy to rename if reviewers prefer.

**A handful of tests still drop views without `close()`** and now log
the new warning during runs; harmless, cleanup to follow.

EDIT: fixed — the only remaining warning is the one
`test_garbage_collection_removes_index_attributes_and_warns` asserts on.
`Camera` previously closed its view only on invalidation, so a dropped
camera still went through `__del__`; it now closes in `Camera.__del__`
too. `test_camera.py` went from 3 warnings to 0.

`SceneDataProvider` fix unchanged (credited with a `Co-authored-by`
line) and replaces its Fabric frame view fix.

cached the result, reusing it while the number of selected prims stayed
the same. Two problems with that. The cache key is unsafe: an equal prim
count does not mean the prims or their order stayed the same, so after a
bucket reorder or a same-count membership change the cached indices
point at the wrong prims and cameras silently read another prim's
transform. And it treats the symptom — the underlying operation is still
proportional to the size of the whole scene, just performed less often.

Making the selection small removes the need for a cache at all, so both
problems go away.

- [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 added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: yts-nv <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
(cherry picked from commit 480370c)
pv-nvidia added a commit to pv-nvidia/pv-isaac-lab that referenced this pull request Aug 27, 2026
The isaac-sim#5677 cherry-pick brought in OvPhysxFrameView code calling OvPhysxView
(try_binding_for / read_into). That class arrives with isaac-sim#6224, which is not on
this release branch, so the module import raised ModuleNotFoundError as soon as
an OVPhysX frame view was initialized.

Restore the direct physx.create_tensor_binding / binding.read calls this branch
provides.
kellyguo11 added a commit that referenced this pull request Aug 29, 2026
…coped Fabric selections (#6805) (#7342)

# Description

Backports two already-merged FrameView PRs to `release/3.0.0-beta2`,
cherry-picked in merge order:

- #5677 — GPU-accelerated FrameView local poses + `xform_space_writer`
API (upstream `69888c34e471`)
- #6805 — scale `FabricFrameView` selections to the view, not the stage
(upstream `480370cdc5b0`, nvbug 6535498)

Two support commits, because this branch predates some prerequisites:

- `Shim needed for Arena compatibility.` (@amillane) adds
`split_clone_template`, backported from #6071. Ordered first so no
commit imports it before it exists.
- `fix: use the OVPhysX tensor binding API…` restores this branch's
`physx.create_tensor_binding()` / `binding.read()`. The #5677 pick
referenced `OvPhysxView`, which arrives with #6224 and is absent here,
so `OvPhysxFrameView` init raised `ModuleNotFoundError`.

Conflict resolutions converge each touched file on its post-#6805 state
from `develop`, so the backported code is byte-identical to what has
been running and tested there. Two consequences of that choice:

- `get_scales()` now returns `ProxyArray` in all backends, as on
`develop`. On this branch it previously returned `wp.array`, so callers
that pass the result straight to Warp APIs need `.warp` (Torch users:
`.torch`). This is the one API change the backport carries.
- The Fabric-hierarchy import stays unconditional (the optional import
is #6499, not backported).

The only deviation from `develop`'s state is test-infra: device
parametrization uses literal `["cpu", "cuda:0"]` because
`test_devices()` does not exist on this branch.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality) —
`FrameView.close()`, writer-scope API
- Breaking change (relative to this release branch only): `get_scales()`
returns `ProxyArray` instead of `wp.array`, matching `develop`

## Tests

- `test_views_xform_prim_ovphysx.py` — 49 passed (26 `cpu` + 24
`cuda:0`; needs one process per device, `ovphysx<=0.3.7` binds device
mode in C++ on first `PhysX(...)`)
- `test_views_xform_prim_newton.py` — 58 passed

---------

Co-authored-by: alex <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: yts-nv <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants