Skip to content

Add a scoped opt-out for the OvPhysX compiled-stage cache - #9167

Merged
AntoineRichard merged 5 commits into
isaac-sim:mainfrom
AntoineRichard:codex/ovphysx-compiled-stage-cache-opt-out
Nov 24, 2026
Merged

AntoineRichard merged 5 commits into
isaac-sim:mainfrom
AntoineRichard:codex/ovphysx-compiled-stage-cache-opt-out

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add OvPhysxCfg.disable_compiled_stage_cache. The default inherits the runtime mode. Set it to True to bypass the compiled-stage cache during attachment. Isaac Lab restores the previous mode immediately after native submission and retains cooked-collider caching.
  • Restore the explicit physics=ovphysx presets for Franka cloth and soft-beam lift, including their camera variants. These presets set disable_compiled_stage_cache=True and use full-stage import. The automatic physics=physx selector still uses Isaac Sim PhysX for these tasks.
  • The presets were removed in Remove OVPhysX presets from deformable lift tasks #7447 because OvPhysX ignored the deformable-root material binding. The published PhysX #504 reproduction on the pinned OvPhysX 0.8 build gave the same final fold angle (0.034°) for root and mesh bindings.

Validation

  • With the registered Isaac-Lift-Cloth-Franka physics=ovphysx preset, 2,048 environments initialized and reset in 53.02 s on an RTX 5090 (OvPhysX 0.8.0.43443703471, OVStage 0.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 the AUTOMATIC cache mode after attachment.
  • All four restored presets reset and ran 12 random-action steps at four environments with finite observations and rewards. Both camera variants returned nonconstant RGB with Newton Warp and OVRTX. The first OVRTX cloth run reached the 160 s smoke-test timeout during renderer startup and passed on retry.
  • 21 lift configuration tests, 38 manager lifecycle tests, and 22 GPU deformable tests passed in separate processes.
  • Repository formatting and changelog checks and the environment-browser generator check passed. The clean Sphinx build passed.

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Nov 23, 2026
@AntoineRichard
AntoineRichard marked this pull request as ready for review November 23, 2026 16:24
@AntoineRichard
AntoineRichard requested a review from a team November 23, 2026 16:24

@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

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

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 · 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."""

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 · 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:

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 · 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.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[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

  1. P2 Submission errors go untested ▶

Summary

Adds OvPhysxCfg.disable_compiled_stage_cache and restores the explicit OvPhysX presets for Franka cloth and soft-beam lifting.

  • OvPhysX attachments can skip compiled-stage caching for one scene.
  • Franka cloth and soft-beam lifting regain explicit OvPhysX presets.

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]
Loading

Reviews (1) · Last reviewed commit: "Opt Franka deformable presets out of com..." · Reviewed by Greptile

Comment on lines +895 to +903
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")

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.

P2 Submission errors go untested

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.

@kellyguo11

Copy link
Copy Markdown
Contributor

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 Nov 23, 2026

@maxkra15 maxkra15 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.

scoped cache bypass makes sense. the preset tests passed on the base (9/9) and failed on this head with the same assertion as CI. Can we fix the selector contract and preserve the config constructor before merging?

)

isaacsim_physx: PhysxCfg = PhysxCfg()
ovphysx: OvPhysxCfg = OvPhysxCfg(disable_compiled_stage_cache=True)

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.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@AntoineRichard
AntoineRichard merged commit 2c4723e into isaac-sim:main Nov 24, 2026
61 checks passed
kellyguo11 added a commit that referenced this pull request Nov 25, 2026
# 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
AntoineRichard added a commit to AntoineRichard/IsaacLab that referenced this pull request Dec 3, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants