Skip to content

Use sparse Kamino SCC for the velocity newton_kamino preset - #9208

Merged
kellyguo11 merged 2 commits into
isaac-sim:mainfrom
yts-nv:yts/velocity-kamino-scc
Nov 25, 2026
Merged

kellyguo11 merged 2 commits into
isaac-sim:mainfrom
yts-nv:yts/velocity-kamino-scc

Conversation

@yts-nv

@yts-nv yts-nv commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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:

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 Deprecate Kamino DVI solver config in favor of SCC #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:
    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 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.

Type of change

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

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
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

🤖 Generated with Claude Code

The velocity tasks' newton_kamino preset ran Kamino's dense P-ADMM solver,
which is 4x (quadrupeds) to 47x (G1) slower per physics step than sparse
SCC with the LLTBRCM bilateral solver at 4096 environments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yts-nv
yts-nv requested a review from a team November 25, 2026 01:51
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Nov 25, 2026

@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 (1). Other reviewed categories look good.

  • PR description: Title and scope match the diff; supplied timings support G1 speedups, but clarify environment-step accounting and provide exact benchmark commands, warmup, and baseline/candidate revisions while preserving template sections.
  • 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 added comment repeats visible settings and generalizes G1’s 40–50× speedup to legged robots despite smaller reported gains; remove it.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

default_shape_cfg=NewtonShapeCfg(margin=0.01, ke=160000.0, kd=1100.0),
)
newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64))
# SCC with sparse dynamics and the reordered bilateral solver: the dense P-ADMM solver is

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 benchmark comment

The comment repeats the configuration and applies a 40–50× speedup to legged robots generally; supplied results support that range only for G1. Remove it; the changelog records the measured G1 result.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in e947a56. The changelog fragment keeps the measured G1 result, and the PR description has the per-robot numbers.

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Switches the velocity tasks’ newton_kamino preset from dense P-ADMM to sparse SCC.

  • Rough velocity tasks use the faster SCC solver when Kamino is selected.

Reviews (1) · Last reviewed commit: "Use sparse Kamino SCC for the velocity n..." · Reviewed by Greptile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @yts-nv ! They probably have a problem with ADMM ?

@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 25, 2026
@kellyguo11
kellyguo11 merged commit cfc2508 into isaac-sim:main Nov 25, 2026
95 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants