Repository navigation
Multi-unit robot.so build, per-unit object cache, faster receipts, 0.5.1 prep - #29
Merged
Merged
Conversation
… the _finish helpers; closure test net covers _finish/_device
…e, no _single_timing twins) for the bindings' per-family registration
…es the all-kernel aggregate in context create; family tables in abi_specs
…ily units (wrapper_common.cuh, per-family registration/ceiling/torch fragments), parallel unit compile + host link
…gistration per family via grid_rbd_torch_def_/impl_<f>, namespace key core-only; multi-TU docs + CHANGELOG
… GRID_RBD_OBJECT_CACHE_DAYS)
…_DAYS opts in to age-pruning
…e notice (GRID_RBD_QUIET), get_robot(urdf_path=) registers on a miss
…lt integrator_gradient), folded into the content key
…easured 15 GB/humanoid at 8)
… go2 128 s, g1 366 s)
…z44 incl. byte-clean receipt lesson, design note)
… shards on resume, repo root on sys.path at import
…rministic sdist repack)
… first per consumer, two GPU shards side by side
…ked twins); h1_2 second-order cell 3021 s -> 81 s
…eceipt-infrastructure entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-unit
robot.sobuild, per-unit object cache, cache GC, compile-on-first-use noticeWhy. A full-g1 bindings build was one 48-minute, 8 GB nvcc translation unit; iiwa14 took 10 minutes. Everything a user does for the first time paid that.
What changed
wrapper_template.custays one fenced file (// [[unit: <family>]] … // [[unit: end]], surface-tagged jax/torch blocks);grid_rbd._unitssplits it intowrapper_core.cu+ one unit per algorithm family (abi_specs.FAMILIES/FAMILY_OF)._compile._build_unitscompiles them-cin a bounded pool (GRID_RBD_BUILD_JOBS, defaultmin(8, cores, MemAvailable/3 GB), heavy families first) and host-links with-Xfatbin -compress-all(size ≈ the old monolith). Shared declarations live inbindings/grid_rbd/wrapper_common.cuh(package data, in both cache keys). One build path; no-rdc.grid_rbd_family_<f>_init_attrs, which call new library-safeinit_grid_kernel_attr_<algo>_checked/_mjx_checkedtwins emitted bykernel_attrs.py. This is an additive change to every generatedgrid.cuh(byte gate: 0 lines removed). The kernel-ceiling table and the torch op registration are per family too; the core's singleTORCH_LIBRARYdelegates togrid_rbd_torch_def_/impl_<f>._single_timingtwins or the never-launched overloads (NOT_LAUNCHED_BY_BINDINGS): ~3x on its own.static; the wrapper no longer references the aggregateinit_grid_checked.<cache_dir>/objects/<unit>-<key>.o): each unit's object is keyed by exactly its compile inputs; only the core unit carries the torch op-namespace key, so a wrapper edit rebuilds only the touched units and family objects are shared across store entries. Kept forever by default;GRID_RBD_OBJECT_CACHE_DAYS=Nopts in to pruning.python -m grid_rbd.gc_cache(dry run;--execute) removes store entries no manifest name binds, danglingbykeypointers, dead staging dirs.WARNING(visible with no logging setup;GRID_RBD_QUIET=1silences) says what is being compiled and roughly how long;get_robot(name, urdf_path=...)compiles and registers on a miss.GRID_RBD_SPLIT_COMPILE=Non the heavy unit(s) (defaultintegrator_gradient), folded into the content key. Off by default: nvcc--split-compilechanges register allocation. A/B on g1 (integrator_gradient unit 362 s → 120 s): every integrator / integrator_gradient / forward_dynamics output bitwise identical, kernel time within 1.3 % (noise). Kept opt-in.ru_maxrssledger only sees the largest unit).algorithm_listclosure fixes found on the way:forward_dynamics_parameter_gradientneedsforward_dynamics;integrator_gradient/integrator_with_gradientneedintegrator(closure test now also matches_finish/_devicehelpers).Measured (RTX 5090 / 24-core host)
Gates: CPU suite (896), iiwa14 + go2 python_wrappers modules one per process (all green), byte gate for the closure fixes (8/8 identical), and ONE fresh full receipt under the RELEASE policy at 9c9d960 (evidence commit 75307e5: 44 shards, 1541 tests, 0 failures, 0 carried) — the whole run took 2 h 31 min on the dev box (the previous release receipt took ~12 h).
Docs: CHANGELOG, Fast Robot Setup (multi-unit note + re-measured table), python_wrappers cache tree + object cache + GC + first-use notice, bindings README build knobs, CLAUDE.md conventions, guide §7.z43/§7.z44,
docs/compile_time_arc_2026-10.md.Receipt infrastructure (same branch; every future receipt is faster)
init_grid_streams+ per-algorithminit_grid_kernel_attr_<algo>_checkedtwins instead ofinit_grid<T>()'s aggregate, which address-took — compiled — every kernel in the header). Measured uncontended: h1_2 fixed second-order cell 3021 s / 15 GB → 81 s / 2.1 GB; g1 floating integrator SHARED 2253 s → 635 s. Refereetest/test_runner_registration.py. Generated headers untouched (header caches hit); runner executables re-key./usr/bin/time's ru_maxrss saw only the largest child → ~4x under-prediction for multi-unit builds); ledger schema 2 with wall time; legacy ledger dropped. Heaviest job per consumer launches first. Two GPU shards side by side in the launcher.--resumere-runs dirty-recorded shards; repo root onsys.path(no-op resume crashed on the stdlibtestpackage).SOURCE_DATE_EPOCH, deterministic sdist repack).0.5.1 prep
pyproject.toml0.5.0 → 0.5.1 (+ README / SECURITY / Sphinx conf), CHANGELOG 0.5.1 section. Release receipt: evidence commit 75307e5 (see above);test/run_validation.py --finalizeverified it undertest/gpu-proof-policy-release.yaml.🤖 Generated with Claude Code