Skip to content

Deprecate Kamino DVI solver config in favor of SCC - #9104

Merged
kellyguo11 merged 2 commits into
isaac-sim:mainfrom
AntoineRichard:codex/deprecate-kamino-dvi
Nov 20, 2026
Merged

kellyguo11 merged 2 commits into
isaac-sim:mainfrom
AntoineRichard:codex/deprecate-kamino-dvi

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Newton renamed Kamino’s DVI forward-dynamics solver to Split Constraint Coupling (SCC) in newton-physics/newton#5303. Isaac Lab already selects SCC internally after #9057.

This PR exposes KaminoSCCSolverCfg and KaminoSCCCfg as the public names. Constructing KaminoDVISolverCfg now emits a DeprecationWarning with the replacement name. Existing settings and serialized configs continue to work, KaminoDVICfg remains a compatibility alias, and published checkpoints still resolve under newtonkaminodvi.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Validation

  • The Newton solver and pretrained checkpoint test files passed (57 passed, one CUDA-only test skipped).
  • All repository pre-commit checks passed via uv run isaaclab --format.
  • Verified that a config serialized before the change loads and builds an SCC solver configuration.
  • A clean Sphinx HTML build passed with warnings treated as errors and local copies of all eight reference inventories. Verified the rendered SCC and DVI API links and migration guide.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (the legacy constructor intentionally emits a deprecation warning)
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to the test changes
  • I have added a changelog fragment for each touched package
  • My name already exists in CONTRIBUTORS.md

@AntoineRichard
AntoineRichard requested a review from a team November 19, 2026 13:52
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Nov 19, 2026
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR makes SCC the public name for Kamino’s existing solver configuration while keeping the DVI names compatible.

  • Kamino configs use SCC names while the old solver name remains available.
  • SCC configs keep the existing Kamino checkpoint name.

No actionable issues found. Tests were inspected but not run during this review.

Reviews (1) · Last reviewed commit: "Deprecate Kamino DVI solver config in fa..." · Reviewed by Greptile

@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: Compatibility and deprecation (1), Style consistency (2). Other reviewed categories look good.

  • PR description: The title and body match the config rename, compatibility bridge, checkpoint mapping, and documentation diff; replace the in-progress strict Sphinx validation statement with its final result.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: Breaking changes: none identified. The DVI constructor warning and migration guide lack removal guidance; add it without inventing a removal version.
  • Implementation: Implementation looks good.
  • Style consistency: The SCC return docstring repeats the next expression without explaining a constraint; remove it.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 3 inline findings.

Automated review; human maintainers own approval decisions.


def _get_dynamics_solver_config(self) -> tuple[Literal["scc"], dict[str, Any]]:
"""Return DVI, which Newton names SCC, and its configuration keyword arguments."""
"""Return SCC and its configuration keyword arguments."""

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 — Remove the redundant return docstring

The revised docstring only restates the literal and mapping returned on the next line. Remove it; the former wording explained the non-obvious DVI-to-SCC mapping.

class KaminoDVISolverCfg(KaminoSCCSolverCfg):
"""Deprecated name for :class:`KaminoSCCSolverCfg`."""

__init__ = deprecated("KaminoDVISolverCfg is deprecated. Use KaminoSCCSolverCfg instead.")(

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 · Compatibility — Add removal guidance to warning

The constructor warning names its replacement but not the planned removal. Add removal guidance to the targeted warning and migration documentation; no exact version is needed.

_assert_forwarded(newton_cfg.dynamics, _KAMINO_DYNAMICS_FIELD_VALUES[:1])


def test_kamino_dvi_cfg_warns_and_builds_scc():

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 — Annotate new test returns

This test and the new legacy-checkpoint test omit the guide-required -> None annotation. Add it to both signatures.

@kellyguo11 kellyguo11 added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Nov 19, 2026
@kellyguo11
kellyguo11 merged commit 42203e5 into isaac-sim:main Nov 20, 2026
186 of 190 checks passed
kellyguo11 pushed a commit that referenced this pull request Nov 25, 2026
# Description

The velocity tasks' `newton_kamino` preset (`RoughPhysicsCfg` in
`core/velocity/velocity_env_cfg.py`) runs Kamino's dense P-ADMM solver.
On the humanoids this makes training impractically slow. On L40s,
`Isaac-Velocity-Rough-G1` at 4,096 envs takes 48.8 s per training
iteration against 1.0 s with MjWarp, so its 5,000 iterations would take
about 68 h.

This PR switches the preset to Kamino's SCC solver with sparse Jacobian
and dynamics and the `LLTBRCM` bilateral solver:

```python
newton_kamino = NewtonCfg(
    solver_cfg=KaminoSCCSolverCfg(
        max_contacts_per_world=64,
        sparse_jacobian=True,
        sparse_dynamics=True,
        dynamics_solver_cfg=KaminoSCCCfg(bilateral_solver_type="LLTBRCM"),
    )
)
```

It changes no solver code, and the Newton pin is unchanged.

## Why P-ADMM is slow here

Profiled with G1 Rough, 4,096 envs, on an L40:
- **The physics step is the whole cost.** It takes 527 ms on Kamino
P-ADMM, against about 2 ms on MjWarp. In maximal coordinates G1 has up
to 524 constraint rows per world.
- **Two kernels take 89% of the GPU time:**
- `llt_blocked_solve`, at 48%, runs on each of the up to 100 P-ADMM
iterations.
- `_build_delassus_elementwise_dense`, at 41%, loops over all 44 bodies
for each of about 137k matrix elements per world.
- **About half of the G1 worlds don't converge within 100 iterations.**
So `use_graph_conditionals=True` or a looser tolerance (1e-3, 1e-2)
leaves the step time unchanged.
- **Sparse P-ADMM is 25× slower still.**

With SCC, sparse dynamics and `LLTB`, the blocked Cholesky still takes
37% of the step. `LLTBRCM` removes that hotspot: no kernel takes more
than 10%. Fewer SCC iterations or a lower contact cap change the step by
under 2%, so the PR leaves both at their defaults.

## Validation

### How it was measured

- **Hardware.** RTX PRO 6000 Blackwell Max-Q, driver 595, Ubuntu, 4,096
envs everywhere.
- **Revisions.**
  - **Candidate:** this PR on `main` at 4653f04.
- **P-ADMM baseline:** the same checkout, with the solver set back to
the old preset's `KaminoPADMMSolverCfg(max_contacts_per_world=64)` at
run time.
- **G1 rows marked "at 892354c":** an earlier checkout at 892354c. It
pins the same Newton (`d31603ff`), and uses `KaminoDVISolverCfg`, the
name `KaminoSCCSolverCfg` had before #9104.
  - Installed with `uv sync --frozen --extra rsl-rl`.
- **Step time.** A small script builds the task with
`resolve_task_config` and `gym.make(task, cfg=env_cfg)` (hydra override
`physics=newton_kamino` or `physics=newton_mjwarp`). It steps with zero
actions: 5 warm-up `env.step` calls, then 10 timed calls between
`torch.cuda.synchronize()` calls (5 warm-up and 3 timed for the slow
P-ADMM baselines).
- **Per physics step** = env-step time / (`decimation` ×
`num_substeps`). All these tasks have `decimation=4`. The Kamino preset
uses 1 substep and the MjWarp preset 2, so a control step is 4 Kamino
physics steps against 8 MjWarp physics steps.
- **Per environment step** is the whole `env.step` time. Because of the
different substep counts, it is the fair Kamino-vs-MjWarp comparison.
- The kernel breakdown above comes from `torch.profiler` (CUDA activity
only) over 3 env steps.
- **Training.** For each task:
  ```bash
python scripts/benchmarks/training.py --rl_library rsl_rl --task
Isaac-Velocity-Rough-<Robot> --seed 42 \
--benchmark_formatter schema --max_iterations 300 --output_path <dir>
physics=<newton_kamino|newton_mjwarp>
  ```
Iteration time is the steady-state value rsl_rl prints. The first
iteration, which includes warp compilation and CUDA graph capture, is
excluded.

**Physics step time.**

| Task (Rough) | P-ADMM, ms per physics step | This PR, ms per physics
step | Faster by | Env step: this PR vs MjWarp |
|---|---|---|---|---|
| G1 | 377 (at 892354c, same Newton pin) | 8.05 | 47× | 32.2 vs 15.3 ms
|
| G1-29DoF | — | 8.41 | | 33.7 vs 19.8 ms |
| H1 | 61.4 | 4.29 | 14× | 17.2 vs 12.6 ms |
| H2 | — | 6.59 | | 26.4 vs 16.9 ms |
| AnymalD | 29.1 | 7.21 | 4.0× | 28.8 vs 9.5 ms |
| UnitreeGo2 | 31.3 | 6.96 | 4.5× | 27.9 vs 55.7 ms |
| Cassie | — | 3.42 | | 13.7 vs 11.4 ms |

On an L40, G1 drops from 527 ms to 12.1 ms per physics step (43×
faster).

**Training.** `scripts/benchmarks/training.py`, rsl_rl, seed 42, 300
iterations. There was no NaN in any run.

| Task | Physics | Iteration time | Episode length at 100 / 200 / 300 |
Mean reward at 300 |
|---|---|---|---|---|
| G1 (at 892354c) | P-ADMM (before) | 36.4 s | — | — |
| G1 (at 892354c) | **this PR** | **0.92 s** | 77 / 428 / 700 | — |
| G1 (at 892354c) | MjWarp | 0.51 s | 65 / 724 / 939 | — |
| H1 | **this PR** | **0.55 s** | 615 / 986 / 958 | 8.1 |
| H1 | MjWarp | 0.42 s | 597 / 1000 / 942 | 10.4 |
| AnymalD | **this PR** | **0.84 s** | 449 / 611 / 765 | 13.2 |
| AnymalD | MjWarp | 0.36 s | 414 / 633 / 821 | 14.2 |

- **H1 and AnymalD** learn at the same pace as on MjWarp.
- **G1** learns to walk, somewhat behind MjWarp at 300 iterations; its
velocity tracking at 300 is 0.42 against 0.57.

Full-length policies were not compared.

**Tests.** `source/isaaclab_tasks/test/core/test_hydra.py` and
`test_env_cfg_no_forbidden_imports.py` pass (134 passed). Ruff 0.14.10
(`format --check` and `check`) passes on the changed file.

**Related.**
-
[newton-physics/newton#5301](newton-physics/newton#5301)
speeds up SCC further and makes `LLTBRCM` Newton's default. The current
pin (`d31603ff`) predates it. A later Newton bump would make the
explicit `bilateral_solver_type` redundant but harmless.
- The P-ADMM convergence and Delassus-build findings are relevant to
[newton-physics/newton#3032](newton-physics/newton#3032).

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/HEAD/skills/developer/test-audit/SKILL.md)
to any test changes
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-docker Trigger the on-demand Docker and GPU CI workflow 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