Repository navigation
Improve benchmark sampling and synchronized timing diagnostics - #6474
AntoineRichard merged 32 commits into
Conversation
Exclude configurable warmup frames from runtime metrics and compute throughput from total measured work over total wall time. Use longer defaults so the quick benchmark is less sensitive to startup and short sampling windows.
Add an opt-in runtime benchmark probe around the environment's SimulationContext step calls. Report host time inside and outside that boundary while preserving the original method after measurement.
Measure environment and synchronized simulation stepping across runtime, training, and play benchmarks. Store the resulting Isaac Lab overhead in benchmark schema 1.1 while leaving regular training and play entry points uninstrumented.
Require an explicit benchmark flag before wrapping environment and simulation steps. Disabled benchmarks now avoid method replacement and device synchronization while schema 1.1 continues to represent measured runs.
Delegate synchronization and elapsed-time measurement to the existing Isaac Lab Timer. Keep the interception layer focused on recording per-step samples so environment, simulation, and derived overhead metrics include standard deviation and peak values.
bb94686 to
ac290ca
Compare
Record the env.step boundary in every benchmark workflow without adding explicit synchronization. Keep the nested synchronized simulation probe optional, and expose environment-step FPS in schema 1.2 so runtime, play, and training results can be compared on the same scope.
Name the opt-in instrumentation after the Isaac Lab overhead it reports instead of the implementation detail used to derive it.
Synchronize before environment and simulation timing begins so policy and action-generation work queued earlier is not attributed to Isaac Lab overhead.
Recalculate throughput standard deviation around the aggregate effective mean so benchmark MeanStd values use one consistent center.
Validate workload counts before launch and require positive environment timing samples so empty synchronized runs fail with actionable errors instead of division by zero.
Run the training and play smoke matrix without synchronized overhead measurement, retain one focused synchronized replay, and verify pending work before env.step is excluded from its metric.
Greptile SummaryThis PR improves benchmark timing output for runtime, training, and play runs. The main changes are:
Confidence Score: 4/5The changed flow looks mergeable after small fixes to its timing diagnostics.
scripts/benchmarks/runtime.py; source/isaaclab/isaaclab/test/benchmark/builders.py Important Files Changed
Reviews (1): Last reviewed commit: "Cover optional benchmark timing paths" | Re-trigger Greptile |
|
|
||
| # Keep the actual first step as a startup diagnostic. With no warmup, | ||
| # the first measured step is also the first post-reset step. | ||
| first_step_s = warmup_step_times_s[0] if warmup_step_times_s else step_times_s[0] |
There was a problem hiding this comment.
First Step Uses Instrumented Timing
When --warmup_frames 0 is used, first_step_s falls back to step_times_s[0], but that sample is collected after EnvironmentStepTimingRecorder is installed. With --measure_isaaclab_overhead, the startup first_step value includes the synchronized timing wrapper, while runs with positive warmup report the raw post-reset first step from warmup_step_times_s; this makes the same startup diagnostic incomparable across warmup settings.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
This remains reproducible after the exact-count update. With --measure_sync_step, warmup_frames=0 derives first_step from the recorder-instrumented measured loop, while warmup_frames=1 derives it from the raw pre-recorder warm-up loop. A focused boundary counter observed four synchronization calls in the zero-warm-up first step and none in the positive-warm-up first step. Please collect this startup diagnostic at the same timing boundary for every warm-up value so the field remains comparable.
There was a problem hiding this comment.
Confirmed. The root cause is that first_step_s has two collection paths with different instrumentation states:
warmup_frames >= 1:warmup_step_times_s[0]— raw timing, recorder not yet installedwarmup_frames == 0:step_times_s[0]— recorder active,--measure_sync_stepadds synchronization barriers
The fix is to unconditionally run exactly one step before installing the recorder, using that as the startup diagnostic. Remaining warmup steps (if any) follow the same pre-recorder path:
# Always collect the startup first step outside the recorder so the
# diagnostic is at the same timing boundary regardless of warm-up value.
_startup_times = stepping.run_runtime_warmup(env, 1)
first_step_s = _startup_times[0]
# Run any remaining warm-up frames before installing the recorder.
if args.warmup_frames > 1:
stepping.run_runtime_warmup(env, args.warmup_frames - 1)
environment_step_timer = stepping.EnvironmentStepTimingRecorder(
env, measure_synchronized_step_breakdown=args.measure_sync_step
)
with environment_step_timer, BenchmarkMonitor(benchmark, interval=1.0):
step_times_s = stepping.run_runtime_loop(env, args.num_frames, reset=False)This makes first_step_s unconditionally raw (no recorder, no sync barriers) and eliminates the warmup_step_times_s[0] if warmup_step_times_s else step_times_s[0] conditional entirely. The warmup_frames argument semantics are preserved: 0 means no additional warmup beyond the mandatory startup step, N means the startup step plus N-1 additional warmup frames before measurement begins. The measured step_times_s array is unaffected.
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
There was a problem hiding this comment.
Keeping this boundary intentionally. Warm-up frames must stay outside the synchronized recorder because they are excluded from timing and throughput. Therefore, with positive warm-up, first_step is the raw first excluded warm-up frame; with zero warm-up, it is the first measured frame under the requested measurement mode. Adding an unconditional raw startup call would violate the exact warmup_frames + num_frames call contract. Commit 196c03a documents this distinction explicitly.
There was a problem hiding this comment.
The call-count contract point is well-taken — an unconditional extra step before the recorder would silently change the semantics of warmup_frames=0 from "zero excluded frames" to "one hidden excluded frame plus N measured frames," which contradicts the documented contract.
The remaining comparability concern is narrower than I framed it: first_step_s under --measure_sync_step with warmup_frames=0 reflects the first measured frame with sync barriers active, which is a valid representation of "first step under configured conditions" rather than a raw baseline. As long as consumers of the schema understand that first_step_s is sampled at the active measurement boundary (and is therefore not directly comparable across (warmup_frames=0, measure_sync_step=True) vs. (warmup_frames≥1, measure_sync_step=True) runs), the design is sound.
If the StartupTime schema or benchmark docs don't already note that first_step_s reflects the measurement mode in effect when it was collected, a one-line clarification there would close the concern without changing any behavior or call counts.
| if len(environment_samples) != len(simulation_samples): | ||
| raise ValueError("Environment and simulation timing samples must have the same length") | ||
| overhead_samples = [ | ||
| total - simulation for total, simulation in zip(environment_samples, simulation_samples) | ||
| ] |
There was a problem hiding this comment.
When synchronized timing records multiple SimulationContext.step() calls inside one env.step(), each simulation timer includes its own synchronization cost before the accumulated value is subtracted from the environment wall time. If the accumulated simulation timing exceeds the outer step timer, the bundle reports negative overhead_step_time_s and overhead_fraction, which makes the new overhead fields misleading for the exact synchronized mode this PR adds.
Keep the first runtime step outside throughput regardless of overhead instrumentation and floor derived overhead at zero when nested wall timers cross due to measurement noise.
|
Addressed both timing-diagnostic findings in c292852:
Added direct regressions for both cases and verified that each test fails when its corresponding fix is removed. The full benchmark unit suite passes ( |
Rename the disputed overhead metric as a serialized synchronized step breakdown and expose explicit measurement modes. Mark every instrumented timing and rate as diagnostic, validate the additive partition, and document why outside-simulation time is not removable overhead.
Define red-green implementation tasks for measured frame counts, training warm-up validation, unconditional cleanup, wrapper rollback, and conventional rate deviation.
Correct the SB3 cleanup boundary and resolved-workload validator import identified during the required pre-execution review.
| RuntimeWarning, | ||
| stacklevel=2, | ||
| ) | ||
| environment_step_times_s = None |
There was a problem hiding this comment.
[P2] When early stopping consumes every post-warm-up sample in synchronized mode, this conversion erases the measurement mode. _runtime_measurements infers serialization only from Runtime.environment_step_timing, which is now None, so the flat output contains Mean Total FPS and omits Mean Serialized Diagnostic Total FPS even though the recorder synchronized every observed step. A focused empty-sample build reproduces timing_present=False, normal_label=True, serialized_label=False. Please preserve the run measurement mode independently of optional timing samples and cover the early-stop plus synchronized case.
There was a problem hiding this comment.
Changed the empty-sample behavior in 954ee28. A run with no post-warm-up timing samples is not useful as a benchmark bundle, so build_runtime now raises an explicit error explaining that the workload may have stopped before warm-up completed and advising the user to reduce warm-up or execute more steps. The allow-empty branches and trainer opt-ins were removed rather than preserving a mode for an empty aggregate.
| benchmarks that excludes the first N ``env.step()`` calls from | ||
| environment-step timing and defaults to ``1`` to remove cold start. Runtime | ||
| and play now execute the requested warmup steps before the requested number | ||
| of measured steps; pass ``--warmup_steps 0`` to measure the first step. |
There was a problem hiding this comment.
[P3] Runtime does not accept --warmup_steps; its flag is --warmup_frames. As written, this sentence tells runtime users to pass an unknown option. Please name both flags explicitly or split the runtime and play instructions.
There was a problem hiding this comment.
Fixed in 196c03a. Runtime and play now consistently use --warmup_frames, while training uses --warmup_steps because its workload is expressed as iterations and environment steps. The play adapters, tests, documentation, metadata, and changelog were updated together.
|
The PR description is stale after the follow-up fixes. It still says runtime always excludes a dedicated startup step, but the current contract makes |
There was a problem hiding this comment.
why have the benchmark_rl_games_train.py script run with contextlib.closing(env): and here we manually run env.close()? Is there a reason it is not used consistently?
There was a problem hiding this comment.
Fixed in 8fa155b. All four play adapters now wrap the fully constructed environment in contextlib.closing, matching training and guaranteeing cleanup if policy loading, execution, result assembly, or formatting raises. The trailing manual env.close() calls were removed.
| env, measure_synchronized_step_breakdown=args.measure_sync_step | ||
| ) | ||
| with environment_step_timer, BenchmarkMonitor(benchmark, interval=1.0): | ||
| step_times_s = stepping.run_runtime_loop(env, args.num_frames, reset=False) |
There was a problem hiding this comment.
[P2] With synchronized measurement and positive warm-up, the first headline throughput sample includes work that should have been excluded. The warm-up runs outside the recorder, then run_runtime_loop starts its outer timer before the wrapper performs its entry synchronization. Pending work from the final warm-up step is therefore drained inside step_times_s[0]. A deterministic boundary reproduction produced outer samples [0.12, 0.06] while the recorder produced [0.06, 0.06]; lines 175-183 use the contaminated outer series for effective FPS. Please drain the warm-up boundary before outer timing, use the synchronized recorder series for synchronized throughput, or run warm-up through equivalent boundaries, and add a positive-warm-up synchronized regression.
This reverts commit f7e9792.
| ) | ||
|
|
||
|
|
||
| def _parse_int(value: str) -> int: |
There was a problem hiding this comment.
is this necessary? couldn't int(value) throw the same error
There was a problem hiding this comment.
Fixed in 6e3b5a9. Both range validators now call int(value) directly and let argparse handle the resulting ValueError; the private _parse_int helper was removed. A focused test covers the native argparse conversion error for both validators.
mmichelis
left a comment
There was a problem hiding this comment.
Left some minor comments, but looks like a great benchmark addition, thanks Antoine!
Align play with runtime by naming its fixed rollout workload in frames. Clarify how runtime startup timing relates to excluded warmup frames.
Let argparse handle conversion failures from benchmark range validators. Remove the private helper that only changed the error wording.
# Description Finalizes the focused perf-smoke follow-ups on `perf-smoke/develop-staging` before the production replay onto current `develop`. - Isolates Warp JIT compilation inside the container for the two camera backends that still hit cross-user cache permissions. - Preserves equal FPS measurements as distinct samples instead of accidentally deduplicating them. - Verifies newly seeded baselines against the exact target branch, current-run sample IDs, runtime fingerprint, and commit ancestry. - Seeds the full task/backend matrix when a new image era is published. - Replaces the technical-only sticky comment with an overall result, plain-language guidance, a compact reviewer table, and collapsed diagnostics. After squash merge, the staging branch's push-triggered L40S gate and full-matrix seeder will provide the final end-to-end validation. The later production PR will replay this tested gate onto current `develop` and include #6474's benchmark timing semantics. No required dependencies are added. ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) ## Test plan - [x] `tools/perf_smoke_test/test`: 62 passed - [x] `tools/perf_smoke_test/validate_tasks.py` - [x] GitHub workflow YAML syntax validation - [x] Full pre-commit suite - [x] Regression tests fail under the old sample-deduplication and verifier behavior - [ ] Post-merge L40S staging gate and full-matrix seeder ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] My changes generate no new warnings - [x] I have added tests that prove the fixes work - [x] No public API documentation or package changelog fragment is required - [x] Contributor affiliation is represented by NVIDIA Corporation & Affiliates --------- Co-authored-by: Neil Mehta <[email protected]>
# Description Promotes the benchmark framework from `isaaclab.test.benchmark` to the public `isaaclab.benchmark` package. Runtime, startup, training, play, and RL backend workflows become library entrypoints with typed in-process dispatch. The transitional import and script shims were removed from this PR to keep the move reviewable and leave one implementation for each workflow. This is an intentional breaking change: callers must replace `isaaclab.test.benchmark` imports with `isaaclab.benchmark` and use `isaaclab benchmark` instead of the former runtime, startup, training, and play scripts. ## Highlights - Adds typed runtime, startup, training, and play request objects and `run_benchmark` convenience APIs. - Returns workflow-specific result types such as `BenchmarkResult[RuntimeBundle]`. - Adds in-process `isaaclab benchmark` CLI dispatch. - Moves the supported benchmark workflows and RL backend adapters into the package. - Removes the duplicate `isaaclab.test.benchmark` namespace and standalone workflow forwarding scripts. - Restores process-global Torch, SKRL, and RL Games state and closes environments safely across repeated calls. - Rejects schema finalization without an attached typed bundle instead of reporting a nonexistent output. - Carries forward #6474 validation: positive workloads, non-negative warm-up counts, one default train/play warm-up step, and `--measure_sync_step`. - Adds public API documentation, migration guidance, tests, and changelog fragments. ## Dependencies - Direct dependency: #6474. - Satisfied prerequisite: #6553, already merged, provides reusable RL train/play entrypoints. ## Breaking migration - `from isaaclab.test.benchmark ...` becomes `from isaaclab.benchmark ...`. - `scripts/benchmarks/{runtime,startup,training,play}.py` becomes `isaaclab benchmark {runtime,startup,training,play}`. - Per-library train/play scripts become the unified training/play commands with `--rl_library`. - Independent camera, loading, Hydra, and other standalone benchmarks remain unchanged. ## Type of change - New feature - Breaking API migration - Documentation update ## Validation - Focused benchmark API, CLI, parser, adapter, and early-stop suite: 265 passed, 4 simulator smoke cases deselected. - Focused public API and CLI entrypoint suite: 26 passed. - `./isaaclab.sh -f`: all applicable hooks pass. The conflict-marker hook was skipped because current `develop` contains literal `=======` headings in three third-party license files. - `tools/changelog/cli.py check develop`: passed. - Runtime/startup smoke tests now invoke `uv run isaaclab benchmark`; the local clean-`uv` bootstrap exceeded the validation window while downloading the CUDA environment, so CI remains the end-to-end CLI confirmation. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding documentation changes - [x] My changes generate no new warnings - [x] I have added tests for the public API and canonical CLI paths - [x] I have added the required changelog fragments - [x] I have documented the intentional breaking migration - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Mustafa Haiderbhai <[email protected]>
# Description Skips resetting inactive instantaneous-wrench composers in the Newton, PhysX, and OVPhysX articulation write paths. Newton and PhysX previously cleared all seven composer buffers on every physics substep even when no instantaneous wrench had been applied. Nsight attributed fourteen 442,368-byte clears per Ant environment step to this work on Newton. OVPhysX already avoids resets when neither composer is active; its guard removes the remaining redundant reset when only permanent wrenches are active. The active check preserves the existing reset after every applied instantaneous wrench. An inactive composer is already fully reset: construction and full reset both zero its five input and two output buffers, while every supported add or set operation marks it active. This is one focused slice of superseded Draft PR isaac-sim#6509 and is independent of benchmark PR isaac-sim#6474. ## Type of change - Bug fix (non-breaking performance fix) ## Validation - ./isaaclab.sh -p tools/changelog/cli.py check develop - ./isaaclab.sh -f before commit - ./isaaclab.sh -f after commit and before push - The Newton source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with ./isaaclab.sh --format - [x] Documentation changes are not required - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment for every touched package - [x] My name already exists in CONTRIBUTORS.md
# Description Adds a protected DirectRLEnv reset hook that preserves the existing indexed reset behavior by default while allowing backend-native task implementations to complete reset processing from a device mask without materializing dynamic reset indices on the host. CUDA torch.nonzero compaction requires determining a dynamic output size and can synchronize the stream. The hook isolates that policy decision without changing existing DirectRLEnv task semantics. ManagerBasedRLEnv is intentionally not included. Its scene, event, recorder, curriculum, observation, action, reward, command, and termination reset contracts currently require compact environment IDs, so adding the same hook there would not yet provide a synchronization-free path. This is one focused slice of superseded Draft PR isaac-sim#6509 and is independent of benchmark PR isaac-sim#6474. ## Type of change - New feature (non-breaking protected extension point) ## Validation - ./isaaclab.sh -p tools/changelog/cli.py check develop - ./isaaclab.sh -f before commit - ./isaaclab.sh -f after commit and before push - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with ./isaaclab.sh --format - [x] Documentation changes are not required for this protected hook - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment for the touched package - [x] My name already exists in CONTRIBUTORS.md
…-sim#6474) # Description Improves benchmark sampling so short runs better represent steady-state environment throughput. Runtime benchmarks support explicit warm-up frames, always exclude the dedicated startup step from throughput, and compute effective FPS over the complete measured interval. Training and play benchmarks now exclude the first `env.step()` call by default through `--warmup_steps 1`; pass `--warmup_steps 0` to include every step. Adds environment-step timing to runtime, training, and play with two explicit modes: - `host_return` records host wall time until `env.step()` returns without forcing queued device work to complete. - `serialized_synchronized`, enabled by `--measure_sync_step`, synchronizes every measured environment and simulation boundary and partitions `env.step()` time into nested `SimulationContext.step()` calls and the remainder outside them. The synchronized mode is diagnostic because its synchronization changes the observed schedule. The outside-simulation remainder includes action and actuator processing, state updates, observations, rewards, terminations, resets, manager execution, wrappers, and measurement synchronization; it is not automatically classified as removable Isaac Lab overhead. Benchmark workload and warm-up counts are validated directly by argparse. Play retains the cross-argument requirement that `warmup_steps < num_frames` so every run produces at least one measured sample. The schema remains version 1.2 and validates the additive timing partition. ## Dependencies - Direct dependencies: none. This is the root PR for the benchmark refactor stack. ## Type of change - Bug fix - New feature - Documentation update ## Validation - Adapter parser tests across RSL-RL, RL-Games, SKRL, and SB3: 36 passed - `./isaaclab.sh -p -m pytest source/isaaclab/test/benchmark -q`: 149 passed - Runtime benchmark smoke tests for default and synchronized modes: 2 passed - Regression coverage was confirmed to fail before the timing partition fix and pass afterward. - `./isaaclab.sh -f` - `./isaaclab.sh -p tools/changelog/cli.py check develop` - `./isaaclab.sh -d` - Earlier branch validation covered PhysX and Newton/MJWarp runtime probes and training/play smoke tests. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding documentation changes - [x] My changes generate no new warnings - [x] I have added regression tests - [x] I have added the required changelog fragments - [x] My name already exists in `CONTRIBUTORS.md`
# Description Promotes the benchmark framework from `isaaclab.test.benchmark` to the public `isaaclab.benchmark` package. Runtime, startup, training, play, and RL backend workflows become library entrypoints with typed in-process dispatch. The transitional import and script shims were removed from this PR to keep the move reviewable and leave one implementation for each workflow. This is an intentional breaking change: callers must replace `isaaclab.test.benchmark` imports with `isaaclab.benchmark` and use `isaaclab benchmark` instead of the former runtime, startup, training, and play scripts. ## Highlights - Adds typed runtime, startup, training, and play request objects and `run_benchmark` convenience APIs. - Returns workflow-specific result types such as `BenchmarkResult[RuntimeBundle]`. - Adds in-process `isaaclab benchmark` CLI dispatch. - Moves the supported benchmark workflows and RL backend adapters into the package. - Removes the duplicate `isaaclab.test.benchmark` namespace and standalone workflow forwarding scripts. - Restores process-global Torch, SKRL, and RL Games state and closes environments safely across repeated calls. - Rejects schema finalization without an attached typed bundle instead of reporting a nonexistent output. - Carries forward isaac-sim#6474 validation: positive workloads, non-negative warm-up counts, one default train/play warm-up step, and `--measure_sync_step`. - Adds public API documentation, migration guidance, tests, and changelog fragments. ## Dependencies - Direct dependency: isaac-sim#6474. - Satisfied prerequisite: isaac-sim#6553, already merged, provides reusable RL train/play entrypoints. ## Breaking migration - `from isaaclab.test.benchmark ...` becomes `from isaaclab.benchmark ...`. - `scripts/benchmarks/{runtime,startup,training,play}.py` becomes `isaaclab benchmark {runtime,startup,training,play}`. - Per-library train/play scripts become the unified training/play commands with `--rl_library`. - Independent camera, loading, Hydra, and other standalone benchmarks remain unchanged. ## Type of change - New feature - Breaking API migration - Documentation update ## Validation - Focused benchmark API, CLI, parser, adapter, and early-stop suite: 265 passed, 4 simulator smoke cases deselected. - Focused public API and CLI entrypoint suite: 26 passed. - `./isaaclab.sh -f`: all applicable hooks pass. The conflict-marker hook was skipped because current `develop` contains literal `=======` headings in three third-party license files. - `tools/changelog/cli.py check develop`: passed. - Runtime/startup smoke tests now invoke `uv run isaaclab benchmark`; the local clean-`uv` bootstrap exceeded the validation window while downloading the CUDA environment, so CI remains the end-to-end CLI confirmation. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding documentation changes - [x] My changes generate no new warnings - [x] I have added tests for the public API and canonical CLI paths - [x] I have added the required changelog fragments - [x] I have documented the intentional breaking migration - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Mustafa Haiderbhai <[email protected]>
# Description Reduces common Direct Locomotion task overhead used by Ant and Humanoid without introducing the experimental Ant post-step path. The change: - stages effort targets once per environment step because articulation command buffers persist across decimation substeps; - uses the cached all-joint target path instead of repeatedly uploading joint indices; - keeps scalar zero assignments on-device; - removes a duplicate articulation reset already performed by the scene reset; - removes redundant clones after advanced indexing; and - uses the common fused joint-state writer provided by PhysX, Newton, and Isaac Lab OV. The isolated device scalar change improved the Ant host-return measurement from 3.433 ms to 3.231 ms. The remaining changes remove repeated launches, index transfers, copies, and reset writes; the larger fused post-step and device-mask work is deliberately excluded. This is one focused slice of superseded Draft PR #6509 and is independent of benchmark PR #6474. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `uv run python tools/changelog/cli.py check develop` - `uv run --frozen isaaclab -f` - `uv run --frozen --extra test python -m pytest source/isaaclab_tasks/test/core/test_environments_newton.py -k 'Direct and (Ant or Humanoid)' -q` (`2 passed`) - Verified the fused writer interface on PhysX, Newton, and Isaac Lab OV. - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [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 (not required for this internal performance fix) - [x] My changes generate no new warnings - [ ] 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
# Description Reduces common Direct Locomotion task overhead used by Ant and Humanoid without introducing the experimental Ant post-step path. The change: - stages effort targets once per environment step because articulation command buffers persist across decimation substeps; - uses the cached all-joint target path instead of repeatedly uploading joint indices; - keeps scalar zero assignments on-device; - removes a duplicate articulation reset already performed by the scene reset; - removes redundant clones after advanced indexing; and - uses the common fused joint-state writer provided by PhysX, Newton, and Isaac Lab OV. The isolated device scalar change improved the Ant host-return measurement from 3.433 ms to 3.231 ms. The remaining changes remove repeated launches, index transfers, copies, and reset writes; the larger fused post-step and device-mask work is deliberately excluded. This is one focused slice of superseded Draft PR #6509 and is independent of benchmark PR #6474. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `uv run python tools/changelog/cli.py check develop` - `uv run --frozen isaaclab -f` - `uv run --frozen --extra test python -m pytest source/isaaclab_tasks/test/core/test_environments_newton.py -k 'Direct and (Ant or Humanoid)' -q` (`2 passed`) - Verified the fused writer interface on PhysX, Newton, and Isaac Lab OV. - The source change was exercised by the original focused CPU/CUDA validation before the PR split; new test files are intentionally omitted from this slice. ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [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 (not required for this internal performance fix) - [x] My changes generate no new warnings - [ ] 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 (cherry picked from commit 25fad3e)
Description
Improves benchmark sampling so short runs better represent steady-state environment throughput. Runtime benchmarks support explicit warm-up frames, always exclude the dedicated startup step from throughput, and compute effective FPS over the complete measured interval. Training and play benchmarks now exclude the first
env.step()call by default through--warmup_steps 1; pass--warmup_steps 0to include every step.Adds environment-step timing to runtime, training, and play with two explicit modes:
host_returnrecords host wall time untilenv.step()returns without forcing queued device work to complete.serialized_synchronized, enabled by--measure_sync_step, synchronizes every measured environment and simulation boundary and partitionsenv.step()time into nestedSimulationContext.step()calls and the remainder outside them.The synchronized mode is diagnostic because its synchronization changes the observed schedule. The outside-simulation remainder includes action and actuator processing, state updates, observations, rewards, terminations, resets, manager execution, wrappers, and measurement synchronization; it is not automatically classified as removable Isaac Lab overhead.
Benchmark workload and warm-up counts are validated directly by argparse. Play retains the cross-argument requirement that
warmup_steps < num_framesso every run produces at least one measured sample.The schema remains version 1.2 and validates the additive timing partition.
Dependencies
This is the root PR for the benchmark refactor stack.
Type of change
Validation
./isaaclab.sh -p -m pytest source/isaaclab/test/benchmark -q: 149 passed./isaaclab.sh -f./isaaclab.sh -p tools/changelog/cli.py check develop./isaaclab.sh -dChecklist
CONTRIBUTORS.md