Skip to content

Remove sync_usd_on_fabric_write workaround (OMPE-85872 fixed in Kit 110.1)#5356

Closed
pv-nvidia wants to merge 1 commit intoisaac-sim:developfrom
pv-nvidia:no_fabric_to_usd_sync
Closed

Remove sync_usd_on_fabric_write workaround (OMPE-85872 fixed in Kit 110.1)#5356
pv-nvidia wants to merge 1 commit intoisaac-sim:developfrom
pv-nvidia:no_fabric_to_usd_sync

Conversation

@pv-nvidia
Copy link
Copy Markdown

Summary

Removes the sync_usd_on_fabric_write workaround from XformPrimView and the Camera sensor. This double-write hack is no longer needed now that the Kit PrepareForReuse fix properly dirties Fabric attributes for the GPU renderer.

Background

When XformPrimView writes transforms to Fabric via SelectPrims + Warp kernels, the data is GPU-resident on omni:fabric:worldMatrix. Prior to the Kit 110.1 fix, the RTX renderer did not pick up these GPU-resident changes because Fabric didn't signal attribute dirtiness at the device level (OMPE-85872).

The workaround was sync_usd_on_fabric_write=True, which mirrored every Fabric pose write back to USD — effectively double-writing transforms (GPU Fabric + CPU USD). This defeated the performance benefit of Fabric for any prim that needed to be visible to the renderer (e.g., cameras).

The PrepareForReuse fix in Kit 110.1 resolves this at the Fabric level using dirtyAttribute (CPU) and getAttributeArrayMGpu / getArrayAttributeArrayWithSizesMGpu (GPU) to properly signal changes to downstream consumers.

Changes

source/isaaclab/isaaclab/sim/views/xform_prim_view.py

  • Removed sync_usd_on_fabric_write constructor parameter
  • Removed self._sync_usd_on_fabric_write field
  • Removed conditional USD mirror writes from _set_world_poses_fabric() and _set_scales_fabric()
  • Simplified _sync_fabric_from_usd_once() (no more save/restore of sync flag)
  • Updated docstring to reflect Fabric writes are purely GPU-resident

source/isaaclab/isaaclab/sensors/camera/camera.py

  • Removed sync_usd_on_fabric_write=True and the associated TODO comment

source/isaaclab/test/sim/test_views_xform_prim.py

  • Added test_fabric_writes_do_not_sync_to_usd regression test: writes via Fabric, then verifies USD xformOp:translate and xformOp:orient still hold their original values

Impact

  • Performance: Eliminates redundant CPU-side USD writes for camera prims (the only caller using sync_usd_on_fabric_write=True)
  • API: Removes sync_usd_on_fabric_write parameter from XformPrimView.__init__(). This is a breaking change for any external code passing this argument, but it defaulted to False so only the internal Camera sensor was affected.
  • Compatibility: Requires Kit 110.1+ with the PrepareForReuse cross-device fix

Test Plan

  • Existing test_views_xform_prim.py tests pass (they never set sync_usd_on_fabric_write=True)
  • New test_fabric_writes_do_not_sync_to_usd validates Fabric/USD isolation

With the Kit PrepareForReuse fix (OMPE-85872), the RTX renderer now
properly picks up GPU-resident Fabric transforms via the MGpu
ReadWrite path. The old sync_usd_on_fabric_write workaround that
double-wrote every Fabric pose change back to USD is no longer needed.

Changes:
- Remove sync_usd_on_fabric_write parameter from XformPrimView
- Remove USD mirror writes from _set_world_poses_fabric and
  _set_scales_fabric
- Remove the save/restore of sync flag in _sync_fabric_from_usd_once
- Remove sync_usd_on_fabric_write=True from Camera sensor (the TODO)
- Add test_fabric_writes_do_not_sync_to_usd to verify Fabric writes
  remain GPU-resident and do not modify USD xformOp attributes

This eliminates the performance penalty of double-writing transforms
for cameras and any other prims that previously required the workaround.
@github-actions github-actions Bot added documentation Improvements or additions to documentation asset New asset feature or request isaac-sim Related to Isaac Sim team isaac-mimic Related to Isaac Mimic team infrastructure labels Apr 22, 2026
@pv-nvidia pv-nvidia changed the base branch from main to develop April 22, 2026 15:59
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

🤖 Isaac Lab Review Bot

Summary

This PR removes the sync_usd_on_fabric_write workaround from XformPrimView now that the Kit 110.1 PrepareForReuse fix (OMPE-85872) properly dirties Fabric attributes for GPU renderers. The implementation is clean and focused.

Architecture Impact

The blast radius is contained:

  • Only Camera sensor was using sync_usd_on_fabric_write=True internally
  • No external code in the repo passes this parameter (confirmed via code search)
  • The XformPrimView API change removes a parameter that defaulted to False, so existing callers are unaffected

Consumers found:

  • camera.py ✅ (updated in this PR)
  • tiled_camera.py (does not use the removed parameter)
  • ray_caster.py, multi_mesh_ray_caster.py, ray_cast_utils.py (do not use it)
  • interactive_scene.py (does not use it)
  • Benchmark scripts (do not use it)

Implementation Verdict

Ship it — Clean removal of dead code with proper regression test.

Test Coverage

Excellent test coverage:

  • New test_fabric_writes_do_not_sync_to_usd directly validates the behavioral change (Fabric writes do NOT sync to USD)
  • Test verifies both position (xformOp:translate) and orientation (xformOp:orient) isolation
  • Test covers both cpu and cuda devices via parametrization
  • The test properly:
    • Sets up Camera prims with known USD positions
    • Writes different values via Fabric
    • Confirms Fabric reads return new values
    • Confirms USD attributes retain original values
  • Existing tests continue to pass (they never used sync_usd_on_fabric_write=True)

CI Status

✅ All checks passing (only labeler check ran for this branch configuration)

Findings

No issues found. The changes are surgical and correct:

🟢 Clean API removal: The sync_usd_on_fabric_write parameter and self._sync_usd_on_fabric_write field are fully removed from XformPrimView

🟢 Correct Camera update: The only caller using sync_usd_on_fabric_write=True (camera.py) now uses the simplified API

🟢 Docstring updated: The class docstring now correctly states "Fabric writes remain GPU-resident and are not mirrored back to USD"

🟢 _sync_fabric_from_usd_once simplified: No longer needs to save/restore the sync flag since it is gone

Minor Notes (not blocking)

  • CHANGELOG.rst: No changelog entry for the breaking API change. Since the removed parameter defaulted to False, external impact is minimal, but documenting it helps users upgrading.
  • Kit version requirement: The PR description mentions "Requires Kit 110.1+" — consider adding this to docstrings or version checks if not already enforced elsewhere.

@pbarejko pbarejko self-requested a review April 24, 2026 20:28
@pv-nvidia pv-nvidia marked this pull request as draft April 27, 2026 17:36
@pv-nvidia pv-nvidia closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation infrastructure isaac-mimic Related to Isaac Mimic team isaac-sim Related to Isaac Sim team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants