Repository navigation
Use sparse Kamino SCC for the velocity newton_kamino preset - #9208
Conversation
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>
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
🟡 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.
There was a problem hiding this comment.
Removed in e947a56. The changelog fragment keeps the measured G1 result, and the PR description has the per-robot numbers.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummarySwitches the velocity tasks’
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
left a comment
There was a problem hiding this comment.
Thanks @yts-nv ! They probably have a problem with ADMM ?
|
run-ci |
Description
The velocity tasks'
newton_kaminopreset (RoughPhysicsCfgincore/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-G1at 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
LLTBRCMbilateral solver: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:
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.use_graph_conditionals=Trueor a looser tolerance (1e-3, 1e-2) leaves the step time unchanged.With SCC, sparse dynamics and
LLTB, the blocked Cholesky still takes 37% of the step.LLTBRCMremoves 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
mainat 4653f04.KaminoPADMMSolverCfg(max_contacts_per_world=64)at run time.d31603ff), and usesKaminoDVISolverCfg, the nameKaminoSCCSolverCfghad before Deprecate Kamino DVI solver config in favor of SCC #9104.uv sync --frozen --extra rsl-rl.resolve_task_configandgym.make(task, cfg=env_cfg)(hydra overridephysics=newton_kaminoorphysics=newton_mjwarp). It steps with zero actions: 5 warm-upenv.stepcalls, then 10 timed calls betweentorch.cuda.synchronize()calls (5 warm-up and 3 timed for the slow P-ADMM baselines).decimation×num_substeps). All these tasks havedecimation=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.env.steptime. Because of the different substep counts, it is the fair Kamino-vs-MjWarp comparison.torch.profiler(CUDA activity only) over 3 env steps.Physics step time.
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.Full-length policies were not compared.
Tests.
source/isaaclab_tasks/test/core/test_hydra.pyandtest_env_cfg_no_forbidden_imports.pypass (134 passed). Ruff 0.14.10 (format --checkandcheck) passes on the changed file.Related.
LLTBRCMNewton's default. The current pin (d31603ff) predates it. A later Newton bump would make the explicitbilateral_solver_typeredundant but harmless.Type of change
Checklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there🤖 Generated with Claude Code