Skip to content

[Backport release/3.0.0] Replace map transforms with pre-owned and reused buffer (#7233) - #7566

Merged
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
AntoineRichard:antoiner/backport-7233-release-3.0.0
Sep 4, 2026
Merged

[Backport release/3.0.0] Replace map transforms with pre-owned and reused buffer (#7233)#7566
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
AntoineRichard:antoiner/backport-7233-release-3.0.0

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

Backport of #7233 (Replace map transforms with pre-owned and reused buffer) to release/3.0.0.

This supersedes #7300, which was the original cherry-pick by @pbarejko. That PR was approved on 2026-08-24 but has been unmergeable (mergeable=false, dirty) ever since, so the fix never reached the release branch. Authorship of the commit is preserved as @pbarejko.

Why it conflicted

ovrtx_renderer.py diverged structurally between develop and release/3.0.0. The backport of #7347 (landed as #7353) was not a line-for-line cherry-pick — on develop #7347 changed 11 lines of that file, while the release-side version changed 1348 (240+/1108−) and restructured code that now only exists in that shape on the release branch:

  • _close_legacy was rewritten from explicit per-binding unbinds into a for attr, name in (...) loop
  • except Exception as e was renamed to as exc
  • the close dispatch was restructured

The three-week-old cherry-pick was written against the pre-#7353 shape, hence the conflicts.

Conflict resolution

One deliberate change from the original PR

#7233 predates #7169, so it wrote cuda_stream=wp.get_stream(self._device).cuda_stream. release/3.0.0 has since taken #7169 and standardized on self._warp_device.stream.cuda_stream — that caching is #7169's fix. Applying the original patch verbatim would have reintroduced a per-call device lookup into the per-frame transform path, partially undoing a fix already on the branch.

Both new call sites and the two new tests are aligned to the release idiom instead. This is the one substantive delta from what was approved on #7300 and is the part most worth a reviewer's attention.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Release backport

This PR targets release/3.0.0 directly; the change is already on develop via #7233.

Testing

  • source/isaaclab_ov/test/test_ovrtx_deformable_bindings.py — 19 passed
  • source/isaaclab_ov/test/test_ovrtx_renderer_contract.py — 37 passed
  • Both new tests (test_update_transforms_writes_caller_owned_buffer, test_update_camera_writes_without_mapping) were confirmed to fail against the unpatched release renderer and pass with the change.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@AntoineRichard
AntoineRichard requested a review from a team September 4, 2026 09:00
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 4, 2026
@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 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.

Isaac Lab Review Bot

The backport replaces legacy OVRTX map/unmap transform updates with direct binding writes: object transforms use a persistent caller-owned Warp buffer, while camera transforms write their per-update Warp buffer using the cached device stream.

  • Design and architecture: The new object-transform buffer is isolated to the legacy renderer path and has a coherent lifecycle: initialized with legacy fields, allocated with the transform bindings, required by the update guard, and released during close. The ovstage path and dispatch structure remain unchanged.
  • API: No public symbols, signatures, defaults, or exports change. The package includes the required past-tense changelog fragment, and the cached self._warp_device.stream.cuda_stream usage preserves the release branch's established device-handling behavior.
  • Implementation: The persistent buffer length matches the Newton index count and kernel launch dimension, and both writes use the existing DataAccess.ASYNC plus cached Warp stream convention. Tests cover the buffer passed to the object kernel and binding, camera write behavior, stream propagation, and close-time release. A non-blocking clarity issue remains: the comment calling the object write() blocking can appear inconsistent with DataAccess.ASYNC, while the camera path intentionally retains a per-update allocation rather than adopting the object's persistent-buffer lifecycle.

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-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This backport replaces per-frame mapped OVRTX transform updates with caller-owned Warp buffers and cached CUDA-stream writes.

  • Allocates and reuses a persistent object-transform buffer on the legacy renderer path.
  • Writes generated object and camera transforms directly through OVRTX bindings.
  • Releases the persistent buffer during renderer shutdown.
  • Adds contract tests and a changelog fragment for the new write behavior.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

The transform buffers are initialized consistently with their bindings, use the renderer’s cached device stream, and are cleaned up with the legacy renderer state; the added tests cover the intended write contract.

Important Files Changed

Filename Overview
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py Replaces mapped legacy transform writes with caller-owned buffers and cached-stream binding writes, including lifecycle cleanup.
source/isaaclab_ov/test/test_ovrtx_deformable_bindings.py Adds tests verifying that object and camera updates pass the expected buffers, asynchronous access mode, and cached CUDA stream.
source/isaaclab_ov/test/test_ovrtx_renderer_contract.py Extends renderer shutdown coverage to ensure the persistent object-transform buffer is released.
source/isaaclab_ov/changelog.d/ovrtx-caller-owned-transform-write.rst Documents the switch from per-frame mapping to caller-owned GPU-buffer writes.

Reviews (1): Last reviewed commit: "Replace map transforms with pre-owned an..." | Re-trigger Greptile

@maxkra15 maxkra15 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@mmichelis mmichelis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Backport looks correct!

@AntoineRichard
AntoineRichard enabled auto-merge (squash) September 4, 2026 13:49
@kellyguo11
kellyguo11 disabled auto-merge September 4, 2026 17:41
@kellyguo11
kellyguo11 merged commit 4e6af98 into isaac-sim:release/3.0.0 Sep 4, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants