Skip to content

Add tiled-camera tile-identity tests for large tile counts - #7740

Closed
mataylor-nvidia wants to merge 2 commits into
isaac-sim:mainfrom
mataylor-nvidia:mataylor/tiled-camera-tile-identity
Closed

mataylor-nvidia wants to merge 2 commits into
isaac-sim:mainfrom
mataylor-nvidia:mataylor/tiled-camera-tile-identity

Conversation

@mataylor-nvidia

@mataylor-nvidia mataylor-nvidia commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Above 4096 tiles the RTX tiled path supplies fewer tiles than were requested while the returned tensor keeps its full requested shape, so the tiling reshape hands environments another environment's pixels.

The failure is invisible to the checks we already have. The tensor shape is right, the dtype is right, and a black-image count passes too, because the mis-sliced tiles usually still contain plausible scene content. Nothing asserted that tile i actually holds environment i's view.

This adds that assertion, plus fast layout tests that pin the tiled-atlas contract.

Tile identity at large tile counts

tiled_camera_tile_identity.py builds a scene where each environment is visually identifiable: every environment holds one cube raised to one of four heights derived from its index. Each camera sees only its own cube, so a tile's marker position identifies the environment it came from. Grouped by assigned level, the measured positions must form cleanly separated bands.

Parametrized at 1024 / 4096 / 8192 / 16384 tiles. Verified it actually discriminates before the skips were added (measured on an L40):

tiles empty tiles band separation verdict
1024 0 clean passed
4096 0 10.77 px passed
8192 3093 -63 px (total overlap) failed
16384 421 -60.95 px failed

At 4096 the bands are 0.15 px wide and 10.8 px apart. At 8192 all four collapse onto the same 0-63 range with means 19.4 / 19.5 / 19.6 / 19.7.

Levels are assigned with a multiplicative hash rather than index % 4 on purpose: with modulo, a layout error that shifts tiles by whole rows can map one level exactly onto another and stay invisible.

Tiled layout contract

Fast, sim-free tests covering the same counts in ~0.2 s:

  • The authored atlas must have room for every requested camera, and be an exact multiple of the tile size.
  • The grid OVRTXRenderData derives for the extraction kernel must agree with the atlas authored by build_render_product_as_string.

That last one matters because those are two independent copies of the same ceil(sqrt(N)) formula — ovrtx_usd.py:267 and ovrtx_renderer.py:268 — and nothing previously held them together. If they drift, every tile is read from the wrong offset while both the render and the returned tensor keep their expected shapes.

Skipped until the upstream fix

  • 8192 and 16384 tile-identity cases
  • test_launch_extract_all_tiles_rejects_a_tiled_buffer_missing_tiles

That last one is a gap worth noting on its own: _launch_extract_all_tiles validates only the channel count, despite its docstring claiming it validates against reading past the tiled buffer. There is no check that the buffer holds num_envs tiles, which is exactly how a 4096-tile buffer becomes 8192 wrong images with no error anywhere. The test asserts it should raise; remove the skip once that validation exists.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Notes for reviewers

  • Only the OVRTX backend is covered. The helper is deliberately renderer-agnostic (it keys on per-row pixel spread rather than assuming a black background), so an Isaac RTX sibling can reuse it — but that needs AppLauncher at module import and I have not validated it at 16k tiles under Kit.
  • The 16384 case allocates a 12288x12288 atlas (~600 MB per render var). If that is too large for CI hardware, I would reduce the tile size rather than the tile count.
  • Changelog fragments are .skip since this is test-only.

A tiled camera returns one image per environment sliced out of a single tiled
framebuffer, and nothing in the returned tensor's shape proves that slice i
holds environment i's view. Above 4096 tiles the renderer supplies fewer tiles
than were requested while the tensor keeps its full requested shape, so the
reshape hands environments another environment's pixels. Shape checks, dtype
checks and black-image counts all still pass, because the mis-sliced tiles
usually contain plausible scene content.

Add a scene where each environment is visually identifiable: every environment
holds one cube raised to one of four heights derived from its index, so a
tile's marker position identifies the environment it came from. Grouped by
assigned level the measured positions must form cleanly separated bands.
Measured on an L40, 1024 and 4096 tiles give bands 0.15 px wide separated by
10.77 px with no empty tiles, while 8192 gives 3093 empty tiles and all four
bands collapsing onto the same range.

Also pin the tiled layout itself: the authored atlas must have room for every
requested camera and be an exact multiple of the tile size, and the grid
OVRTXRenderData derives for the extraction kernel must agree with the atlas
authored by build_render_product_as_string. Those are two independent copies of
the same ceil(sqrt(N)) formula, and nothing previously held them together.

The 8192- and 16384-tile cases and the extraction capacity check are skipped
until the upstream renderer fix lands.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with both previous review concerns addressed and no new actionable issues identified.

Findings

  1. P2 Identity signal is not unique ▶
  2. P2 Skip behavior contradicts documentation ▶

Summary

  • Verifies marker-level consistency across 1,024 to 16,384 camera tiles.
  • Uses strict expected failures for tile counts above the renderer’s current 4,096-tile limit.
  • Checks that authored atlas dimensions provide sufficient whole-tile capacity.
  • Checks agreement between the authored atlas and extraction grid calculations.

Reviews (2) · Last reviewed commit: "Address greptile review: match skip/xfai..."

@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 PR adds OVRTX tiled-camera identity coverage, shared scene/measurement utilities, and atlas layout contract tests across large tile counts. One documentation mismatch should be corrected before merge: the regression cases are skipped, not marked xfail as stated.

  • Design and architecture: The renderer-agnostic identity helper is reasonably separated from the OVRTX-specific integration test, while the atlas/grid tests pin the independently derived layout calculations together. No architecture concern is established by the accepted finding.
  • API: No production APIs, exports, or configurations change. Test-only changelog fragments are present for both affected packages.
  • Implementation: The module docstring says the 8192/16384 cases use xfail and will report XPASS after an upstream fix, but the parameters actually use pytest.mark.skip and therefore never execute or signal recovery. Either use strict xfail semantics or document that maintainers must remove the skips manually.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

from. Grouped by assigned level, the measured positions must form cleanly separated bands.

The 8192- and 16384-tile cases are the regression cases and currently fail: the bands collapse into each
other and a large fraction of tiles come back empty. They are marked ``xfail`` so the suite reports the

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.

🟡 Warning · Implementation — Docstring claims xfail but code skips

The module docstring says the 8192/16384 cases are marked xfail and "will flag as XPASS once the renderer supplies every requested tile", but _SKIP_ABOVE_TILE_LIMIT is pytest.mark.skip. Skipped cases never execute, so no signal ever appears when the renderer is fixed and the documented behavior misleads future maintainers. Either use pytest.mark.xfail(strict=True) or reword the docstring to describe the skip and its manual removal.

Switch the above-tile-limit markers from skip to strict xfail so the
suite behaves as the module docstring already promised (report the
regression, flag XPASS once the renderer is fixed). Also narrow the
tile-identity module doc: shared per-level markers only catch tiles
crossing a level boundary, not a swap between two tiles at the same
level.
@mataylor-nvidia

Copy link
Copy Markdown
Contributor Author

@greptile review

@mataylor-nvidia

Copy link
Copy Markdown
Contributor 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 14, 2026
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.

1 participant