Repository navigation
Add a scoped opt-out for the OvPhysX compiled-stage cache - #9167
AntoineRichard merged 5 commits into
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (2), Test quality (1). Other reviewed categories look good.
- PR description: The title and body match the diff; retain supplied hardware, backend versions, environment count, and timings, and add baseline/candidate revisions, command, cache state, warmup, and timing boundaries for reproducibility.
- 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 scaling guidance needs to distinguish demonstrated initialization and reset from supported training, and the lifecycle-test docstring must describe its single attachment rather than promise a subsequent one.
- Test quality: The failure row raises after restoration, leaving exceptional scope exit untested; raise from attach_ovstage and adjust the stage assertion to protect the finally path.
Minor fixes needed. Posted 3 inline findings.
Automated review; human maintainers own approval decisions.
| OvPhysX 0.8 can store compiled physics stages in the cooked-collider cache | ||
| directory. Large deformable scenes can attach faster with compiled-stage | ||
| caching disabled. Set ``OvPhysxCfg(disable_compiled_stage_cache=True)`` to opt | ||
| out for a scene. The Franka cloth and soft-beam lift tasks set this option |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Qualify the deformable scale guidance
This section names presets configured for 2,048 environments, while the adjacent limitations say workloads with thousands are unsupported. Distinguish the demonstrated initialization and reset from supported training-scale use.
|
|
||
| @pytest.mark.parametrize("fail", [False, True], ids=["success", "attach-failure"]) | ||
| def test_load_scopes_compiled_stage_cache_opt_out(monkeypatch, manager_module, manager, fail): | ||
| """A subsequent attachment must inherit the original cache setting even after a failed attach.""" |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Describe the attachment actually tested
The docstring promises a subsequent attachment, but the test performs one load. Describe the mode checks during attachment and waiting instead.
| def wait(task): | ||
| assert task is receipt | ||
| assert mode == CompiledStageCacheMode.READ_ONLY | ||
| if fail: |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Fail inside the attachment scope
The failure row raises in wait_task, after cache restoration, so it cannot catch a missing finally path. Raise from attach_ovstage and adjust the stage assertion.
[Medium impact] The PR affects OvPhysX stage attachment and two deformable lift task families. The PR appears safe to merge, with a non-blocking test gap around attachment submission errors. Findings
SummaryAdds
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Populate stage] --> B[Acquire attach lock]
B --> C{Disable compiled-stage cache?}
C -->|Yes| D[Save mode and disable cache]
C -->|No| E[Submit attachment]
D --> E
E --> F[Restore mode if changed]
F --> G[Release lock]
G --> H[Wait for attachment]
Reviews (1) · Last reviewed commit: "Opt Franka deformable presets out of com..." · Reviewed by Greptile |
| def attach(stage, *, read_ordinal): | ||
| assert mode == CompiledStageCacheMode.DISABLED | ||
| return receipt | ||
|
|
||
| def wait(task): | ||
| assert task is receipt | ||
| assert mode == CompiledStageCacheMode.READ_ONLY | ||
| if fail: | ||
| raise RuntimeError("attach failed") |
There was a problem hiding this comment.
The attach-failure case raises only from wait_task, after the cache mode has already been restored. It never checks restoration when attach_ovstage itself raises inside the scope. Add a submission-error case that checks the original mode is restored and a later default attachment inherits it. Otherwise, a change that leaves caching disabled for later scenes could pass these tests.
|
run-ci |
| ) | ||
|
|
||
| isaacsim_physx: PhysxCfg = PhysxCfg() | ||
| ovphysx: OvPhysxCfg = OvPhysxCfg(disable_compiled_stage_cache=True) |
There was a problem hiding this comment.
Can we cover the explicit-only OvPhysX choice for all four restored presets? The shared test expects PhysxAutoCfg.ovphysx to match the explicit config. Wiring it in here would make kitless physics=physx pick OvPhysX. I'd keep the shared check for other tasks and test both paths here, including the camera variants.
There was a problem hiding this comment.
Added launcher-level coverage for cloth and soft lift, including both camera variants, in 98ff540c87. For all four, physics=ovphysx selects OvPhysX with the cache disabled, and physics=physx still resolves to Isaac Sim PhysX. The shared check still applies to the other tasks. All 13 tests in test_preset_kit_decision.py passed.
| purged between boots. | ||
| """ | ||
|
|
||
| disable_compiled_stage_cache: bool = False |
There was a problem hiding this comment.
Could we make this keyword-only or move it to the end? Inserting it here shifts the existing positional arguments. With the same call on base and head, the True that used to enable enhanced determinism now disables the compiled-stage cache.
There was a problem hiding this comment.
Made disable_compiled_stage_cache keyword-only in 98ff540c87. I compared the constructor signature against the PR base and verified that the same positional True still enables enhanced determinism.
# Description The OvPhysX guide still says deformables should be used only for small validation scenes and that workloads with thousands of environments are unsupported. This predates the compiled-stage cache opt-out in #9167, which validated initialization and reset of 2,048 Franka cloth environments on the pinned OvPhysX 0.8 runtime. Remove that obsolete workload-size restriction and link to the existing compiled-stage cache guidance. Keep the implementation-backed limitations: uniform simulation-node counts per deformable view, full-stage materialization, and no heterogeneous native fast-path cloning. The determinism caveat also remains unchanged because end-to-end reproducibility is still unverified. ## Type of change - Documentation update ## Validation - Checked current upstream main (`d7df24ffb`) and the pinned OvPhysX `0.8.0.43443703471` integration. - Confirmed the scale claim against the recorded 2,048-environment validation in #9167; no new GPU run performed. - Passed repository-wide formatting and lint checks: `ISAACLAB_CHANGELOG_BASE_REF=upstream/main uv run --no-sync isaaclab --format`. - Passed `git diff --check` and skill validation (24 skills). - No source packages or tests changed; no changelog fragment required. Full documentation build not run. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings in the completed checks - [x] Validation matches the documentation-only scope; no tests changed - [x] No source packages changed, so no package changelog fragment is required - [x] My name already exists in CONTRIBUTORS.md
…ates Move the PR description evidence rules into the contribution guide and route the PR workflow skill to them. The SPRI skill now scales with the change, keeps the number or name that is the point, keeps per-section openings for long documents only, treats inferences as invented facts, and uses merged PR descriptions (isaac-sim#9283, isaac-sim#9297, isaac-sim#9167) as examples. The issue skill stops when issues are disabled or a duplicate exists, and checks permalinks instead of every link.
Summary
OvPhysxCfg.disable_compiled_stage_cache. The default inherits the runtime mode. Set it toTrueto bypass the compiled-stage cache during attachment. Isaac Lab restores the previous mode immediately after native submission and retains cooked-collider caching.physics=ovphysxpresets for Franka cloth and soft-beam lift, including their camera variants. These presets setdisable_compiled_stage_cache=Trueand use full-stage import. The automaticphysics=physxselector still uses Isaac Sim PhysX for these tasks.Validation
Isaac-Lift-Cloth-Franka physics=ovphysxpreset, 2,048 environments initialized and reset in 53.02 s on an RTX 5090 (OvPhysX0.8.0.43443703471, OVStage0.4.0.1794520352). The earlier cache-enabled run timed out at 600 s. The preset run verified all 2,048 Frankas and cloth instances, finite reset observations, and restoration of theAUTOMATICcache mode after attachment.