Repository navigation
Added Rendering Benchmark - #7702
Conversation
Greptile SummaryThis PR adds a renderer benchmark driver, a backend-neutral NVTX timing scope, and a deterministic Franka/cabinet benchmark environment.
Confidence Score: 4/5The PR should not merge until the cloned overlapping ground geometry is corrected so benchmark results represent the intended scene. Every environment clones a 50 m ground despite only 3 m spacing, causing many coplanar meshes to overlap and skew renderer workload as the environment count grows; the pose documentation also misstates the configured quaternion rotations. Files Needing Attention: source/isaaclab_tasks/isaaclab_tasks/core/render_benchmark/render_benchmark_env_cfg.py; source/isaaclab_tasks/isaaclab_tasks/core/render_benchmark/render_benchmark_env.py Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[benchmark_renderer.py selects profile] --> B[Launch runtime under nsys]
B --> C[Create Franka/cabinet environments]
C --> D[Animate articulation targets]
D --> E[Read tiled-camera output]
E --> F[RenderContext updates scene state]
F --> G[NVTX-scoped renderer.render]
G --> H[Renderer output readback]
H --> I[Export nsys report to SQLite]
I --> J[Parse per-frame NVTX ranges]
J --> K[Report timing and pixel throughput]
Reviews (1): Last reviewed commit: "Added Rendering Benchmark" | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The renderer benchmark, profiling scope, and direct task are structurally coherent, but the camera and light quaternions use the wrong component order, producing a scene view and lighting direction that differ from the documented benchmark setup. The new public CLI options also violate the repository’s snake_case convention.
- Design and architecture: The backend-agnostic NVTX scope and preset-driven benchmark task provide a reasonable comparison path across OVRTX and Newton. Correct the camera and light orientations so both backends exercise the intended, consistently framed and lit scene.
- API: The profiling constant and environment-gated behavior are additive, and
render_into_camerapreserves its signature and update/render/read sequence. Rename the newly introduced hyphenated CLI options to snake_case before they become an established compatibility surface. - Implementation: The camera offset and distant-light orientation tuples are documented and authored as
(x, y, z, w), while the relevant Isaac Lab interfaces consume(w, x, y, z). Reorder both tuples and update their documentation; otherwise the camera points away from the intended workspace and the lighting does not match the claimed direction.
Minor fixes needed. Posted 3 actionable findings inline.
Automated review; human maintainers own approval decisions.
| env["OVRTX_rtx_minimal_useMinimalPipeline"] = "1" if profile["settings"]["min-pipe"] else "0" | ||
|
|
||
| if renderer == NEWTON_RENDERER: | ||
| env["NEWTON_BVH_SCENE"] = profile["settings"]["tlas"] |
There was a problem hiding this comment.
Env var names are duplicated between here and render_benchmark_env_cfg.py (NEWTON_BVH_SCENE, NEWTON_BVH_GEOMETRY, NEWTON_USE_CUDA_GRAPH) with no shared constant. A typo/rename on one side would silently fall back to the default on the other instead of erroring. Consider defining these names once (e.g. in a shared module) and importing them in both places.
There was a problem hiding this comment.
Do we really need (or usually do) consts for environment variables across very different places?
I can do it if wanted, but am not sure if I like it :) Should I do it?
| import sys | ||
| from pathlib import Path | ||
|
|
||
| PROFILES = [ |
There was a problem hiding this comment.
This list has ~6 near-identical OVRTX dicts and ~6 near-identical Newton dicts, hand-copied and varying only min-pipe/tlas/blas. Consider generating it with itertools.product over the shading-mode/pipe-flag and tlas/blas combos instead — hand-copying makes it easy to leave a field stale (e.g. forget to flip min-pipe) when adding a new variant.
There was a problem hiding this comment.
I find it much easier to read this way - and I am not sure if I agree on the argument of hand-copying making it easy to leave a field stale. I think the same could happen if it is built with itertools or similar.
|
run-ci |
The repository convention, enforced by test_registered_task_physx_presets_keep_auto_selection_explicit, reserves the `physx` preset name for the automatic selector (PhysxAutoCfg, resolved to a concrete backend at launch) and `isaacsim_physx` for the concrete Isaac Sim PhysX configuration. RenderBenchmarkPhysicsCfg bound `physx` directly to PhysxCfg, so registering the task failed that check. Rename the concrete config to `isaacsim_physx` and expose `physx` as the PhysxAutoCfg selector wrapping it, and update the task's own preset test to match.
|
run-ci |
The render benchmark and the Shadow Hand camera benchmark exist to measure rendering throughput, not to train policies, so they do not belong beside the trainable task families. Collect them under a new `benchmark` package that may depend on `core` and `contrib` while neither depends on it. Task ids are unchanged. The Shadow Hand benchmark configuration moves out of `contrib.reorient.config.shadow_hand`, and its registration moves with it, so `contrib` no longer registers a task whose config lives elsewhere.
|
run-ci |
1 similar comment
|
run-ci |
Follows how isaac-sim#7702 handled ISAACLAB_RENDER_PROFILE: the timer is simply always on rather than gated behind a flag. Doing the same for ISAACLAB_PHYSICS_PROFILE removes the reason for everything --mode was carrying. Every log now has physics timings, so the parser no longer tracks whether a frame has them, the table no longer chooses its columns per run, and the test log writer no longer makes physics optional. The scene switch stays on BENCHMARK_MODE, read directly the way the profile env vars are. Both modes report physics, render, and total; the mode decides what the physics number means, not whether there is one.
# Description Follow-up to #7702. Added direct-pose and actuator-driven workloads to the canonical Franka cabinet renderer benchmark, with physics and render timings available through the benchmark API and persisted reports. - `BENCHMARK_MODE=render` (default) writes the analytic joint pose after physics and before the camera read. `BENCHMARK_MODE=physics_render` sets actuator targets before physics. Both modes still step physics. - Direct posing requires lazy sensor updates. With Isaac RTX, it also rejects visualizers that pump the Kit app before the pose write; use `--visualizer none` or `physics_render`. - Runtime benchmarks collect synchronized scopes after warmup when the task has a non-`None` `benchmark_mode` and the corresponding `ISAACLAB_PHYSICS_PROFILE` / `ISAACLAB_RENDER_PROFILE` flag is enabled. Temporary wrappers restore the original methods on success or failure, so subsequent runs do not inherit profiling overhead or duplicate samples. - Schema **1.4 remains unchanged**. `BenchmarkResult.bundle.extra`, schema JSON, and OmniPerf output include per-call mean, standard deviation, maximum [ms], and call count under `physics_*` and `render_*`. Disabled scopes add no keys, and distributed metadata is preserved. - Ordered raw samples remain in local `profile_timings.json`, outside `output_paths`. The renderer sweep groups physics calls by rendered frame and reports render, physics, and combined statistics without scraping logs. Invalid profiling output errors propagate. ```bash uv run python scripts/benchmarks/benchmark_renderer.py 'newton_*' BENCHMARK_MODE=physics_render uv run python scripts/benchmarks/benchmark_renderer.py 'newton_*' ``` Scope timing synchronizes the device and changes execution overlap, so profiled runs are diagnostics. API/OmniPerf summaries cover all captured calls; the sweep additionally removes padding frames and reports per-frame statistics. Migration: collect scope timings through the runtime benchmark; normal simulations no longer install render timers from the profiling flag. Read scalar summaries from `bundle.extra` or raw `timings_ms` pairs from the local profiling file. The old `isaaclab.renderers.render_context.RENDER_PROFILE_SCOPE` import remains available with a deprecation warning; use `isaaclab.benchmark.stepping.RENDER_PROFILE_SCOPE`. ## Validation - Benchmark, renderer orchestration, task configuration, sweep, and runtime smoke tests: 398 passed, 1 skipped. - Regression tests failed before the fixes and passed afterward for profiling restoration, the deprecated scope import, and invalid direct-pose rendering configurations. - Real Newton GPU sweeps passed in both modes with 1 environment, 3 measured frames, and 64×64 resolution. Reported statistics were independently checked against raw samples. - Formatting and changelog checks passed against the current `develop` base. - Sphinx documentation built without warnings or errors using `uv run --isolated --extra dev -- make -C docs current-docs` with `SPHINXOPTS='-D viewcode_follow_imported_members=0'` to omit imported source-code links. ## Type of change - New feature - Bug fix - Breaking change: render profiling moved from normal simulation runs into the runtime benchmark - Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with `uv run isaaclab -f` - [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 - [x] My name already exists in `CONTRIBUTORS.md`
# Description Follow-up to #7702. Added direct-pose and actuator-driven workloads to the canonical Franka cabinet renderer benchmark, with physics and render timings available through the benchmark API and persisted reports. - `BENCHMARK_MODE=render` (default) writes the analytic joint pose after physics and before the camera read. `BENCHMARK_MODE=physics_render` sets actuator targets before physics. Both modes still step physics. - Direct posing requires lazy sensor updates. With Isaac RTX, it also rejects visualizers that pump the Kit app before the pose write; use `--visualizer none` or `physics_render`. - Runtime benchmarks collect synchronized scopes after warmup when the task has a non-`None` `benchmark_mode` and the corresponding `ISAACLAB_PHYSICS_PROFILE` / `ISAACLAB_RENDER_PROFILE` flag is enabled. Temporary wrappers restore the original methods on success or failure, so subsequent runs do not inherit profiling overhead or duplicate samples. - Schema **1.4 remains unchanged**. `BenchmarkResult.bundle.extra`, schema JSON, and OmniPerf output include per-call mean, standard deviation, maximum [ms], and call count under `physics_*` and `render_*`. Disabled scopes add no keys, and distributed metadata is preserved. - Ordered raw samples remain in local `profile_timings.json`, outside `output_paths`. The renderer sweep groups physics calls by rendered frame and reports render, physics, and combined statistics without scraping logs. Invalid profiling output errors propagate. ```bash uv run python scripts/benchmarks/benchmark_renderer.py 'newton_*' BENCHMARK_MODE=physics_render uv run python scripts/benchmarks/benchmark_renderer.py 'newton_*' ``` Scope timing synchronizes the device and changes execution overlap, so profiled runs are diagnostics. API/OmniPerf summaries cover all captured calls; the sweep additionally removes padding frames and reports per-frame statistics. Migration: collect scope timings through the runtime benchmark; normal simulations no longer install render timers from the profiling flag. Read scalar summaries from `bundle.extra` or raw `timings_ms` pairs from the local profiling file. The old `isaaclab.renderers.render_context.RENDER_PROFILE_SCOPE` import remains available with a deprecation warning; use `isaaclab.benchmark.stepping.RENDER_PROFILE_SCOPE`. ## Validation - Benchmark, renderer orchestration, task configuration, sweep, and runtime smoke tests: 398 passed, 1 skipped. - Regression tests failed before the fixes and passed afterward for profiling restoration, the deprecated scope import, and invalid direct-pose rendering configurations. - Real Newton GPU sweeps passed in both modes with 1 environment, 3 measured frames, and 64×64 resolution. Reported statistics were independently checked against raw samples. - Formatting and changelog checks passed against the current `develop` base. - Sphinx documentation built without warnings or errors using `uv run --isolated --extra dev -- make -C docs current-docs` with `SPHINXOPTS='-D viewcode_follow_imported_members=0'` to omit imported source-code links. ## Type of change - New feature - Bug fix - Breaking change: render profiling moved from normal simulation runs into the runtime benchmark - Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with `uv run isaaclab -f` - [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 - [x] My name already exists in `CONTRIBUTORS.md` (cherry picked from commit 3714907)
Description
Adds a rendering benchmark for comparing OVRTX and Newton/Warp renderer performance on an animated Franka + Sektion-cabinet scene, plus the plumbing needed to measure it.
scripts/benchmarks/benchmark_renderer.py: sweeps a declarative list of renderer profiles (OVRTX old/new pipeline × shading presets, Newton BVH constructor combinations) undernsys, parsesper-frame render times from the exported NVTX ranges, and reports pixels/second plus median/mean/min/max/stdev either as a table or as JSON.
source/isaaclab/isaaclab/renderers/render_context.py: adds a backend-agnostic NVTX range (RENDER_PROFILE_SCOPE) aroundRenderContext.render_into_camera's renderer call, gated by theISAACLAB_RENDER_PROFILEenv var so it has no effect (and no device-sync cost) in normal runs.source/isaaclab_tasks/isaaclab_tasks/core/render_benchmark/: a new direct-workflow task,Isaac-RenderBenchmark-Franka-Cabinet, with no policy or reward — all articulated joints (Franka +cabinet drawers/doors) are driven by a deterministic sinusoid so every frame has moving geometry to render. Supports
newton_mjwarp/physxphysics presets andrgb/albedo/depth/simple_shading_*camera presets.Type of change
Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there