Repository navigation
Fix asset benchmark initialization and timing noise - #8851
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryFixes asset benchmark setup and reduces noise in timed samples.
Review was based on code inspection; no tests were run during this review. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Initialize mock targets] --> B[Preflight and warmup]
B --> C[Save GC state and disable automatic GC]
C --> D[Refresh inputs and prepare dependencies]
D --> E[Time one synchronized operation]
E --> F{More samples?}
F -->|Yes| D
F -->|No| G[Restore prior GC state]
D -->|Failure| G
E -->|Failure| G
G --> H[Return statistics or raise error]
Reviews (1) · Last reviewed commit: "Fix asset benchmark initialization and t..." · Reviewed by Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (1). Other reviewed categories look good.
- PR description: The description matches the diff, but “large latency outliers” is unmeasured; add reproducible base/head results with revisions, command, hardware, backend, environment count, warmup, iterations, and a dispersion metric.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The user benchmark page exposes Newton mock call-history internals already covered by the backend changelog; this adds maintenance-only prose, so delete that sentence.
- Test quality: Test quality looks good.
Minor fixes needed. Posted 1 inline finding.
Automated review; human maintainers own approval decisions.
| objects. Their pose and velocity dependencies are prepared outside the timed | ||
| call. Automatic cyclic garbage collection is suspended during each batch of | ||
| timed asset calls, then its previous state is restored. Newton mock callbacks | ||
| do not retain call histories. |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Harness internals in user benchmark docs
"Newton mock callbacks do not retain call histories" documents benchmark-fixture internals with no user-facing contract and repeats the isaaclab_newton changelog fragment. Delete that sentence; keep the GC and untimed-dependency notes that affect result interpretation.
|
run-ci |
| } | ||
| OVPHYSX_RIGID_OBJECT_DEPENDENCIES = RIGID_OBJECT_DEPENDENCIES | ||
|
|
||
| OBJECT_COLLECTION_DEPENDENCIES = { |
There was a problem hiding this comment.
PhysX rigid_object_collection still benchmarks body_state_w, body_link_state_w, body_com_state_w and object_state_w with no dependencies declared, so the timed read includes recomputing their pose/velocity inputs (3.6–5.6× higher on a 4096×4 mock run). Same fix as the articulation table; fine here or as a follow-up.
Suggested edit:
| OBJECT_COLLECTION_DEPENDENCIES = { | |
| OBJECT_COLLECTION_DEPENDENCIES = { | |
| "body_state_w": ("body_link_pose_w", "body_com_vel_w"), | |
| "body_link_state_w": ("body_link_pose_w", "body_link_vel_w"), | |
| "body_com_state_w": ("body_com_pose_w", "body_com_vel_w"), | |
| "object_state_w": ("body_link_pose_w", "body_com_vel_w"), |
maxkra15
left a comment
There was a problem hiding this comment.
The isolated articulation signature test now fails: TT imports while ovphysx is blocked. Add a TT stub at that test boundary, or defer the new import until after binding construction. Normal repository pytest reproduces it.
|
run-ci |
|
run-ci |
maxkra15
left a comment
There was a problem hiding this comment.
The binding import order is fixed. Benchmark/runtime checks pass:32 tests,1 optional skip. Current-head CI is green.
Description
Asset micro-benchmarks could abort on missing mock initialization or CPU gravity buffers during CUDA reads. Newton's timed mock callbacks recorded call histories and retained array arguments, while automatic cyclic garbage collection remained enabled during sampling. These issues were found while benchmarking #8843.
This fixes the PhysX, Newton, and OVPhysX mock setup, uses non-recording Newton callbacks during benchmarking, and suspends automatic cyclic GC only while collecting samples, restoring the caller's state on failure too. It also includes the seven missing packed root/body state readers, prepares their dependencies outside timing, and keeps Newton rigid-object root/body sources consistent. This PR is based on
mainand does not depend on #8843.Type of change
Validation
n=2. These are correctness smoke runs, not performance reference numbers.uv run isaaclab -f, changelog validation,git diff --check, and cleanuv run --extra dev isaaclab --docspassed. Existing dependency/task deprecation notices remain.Checklist
uv run isaaclab --formatCONTRIBUTORS.md