Skip to content

refactor(motrix): 移除临时 body-state kernel (#1311) - #1312

Merged
TATP-233 merged 1 commit into
dev/issue-1304-motion-numba-body-statefrom
refactor/issue-1311-motrix-body-state-descope
Aug 26, 2026
Merged

refactor(motrix): 移除临时 body-state kernel (#1311)#1312
TATP-233 merged 1 commit into
dev/issue-1304-motion-numba-body-statefrom
refactor/issue-1311-motrix-body-state-descope

Conversation

@TATP-233

Copy link
Copy Markdown
Collaborator

Summary

  • 删除 perf(body-state): 接通统一 copy contract 并同步优化 MuJoCo/MJWarp #1307 留下的 Motrix 专用临时 Numba body-state kernel、import、TODO 与专用 kernel 测试。
  • 恢复 Motrix 0.8.2 既有的 cache-based NumPy copy_body_state_w() adapter,并验证 body order、xyzw→wxyz、caller-owned outputs 与 scratch 复用。
  • 不修改统一 SimBackend/Entity contract;MuJoCo/MJWarp 继续使用共享 parallel Numba kernel。
  • 不升级 MotrixSim,不对 Motrix 做本轮 benchmark 或性能/support 声明。训练数值语义不变。

Linked Work

Validation

  • make check
  • focused backend/body-state tests
  • make test-all
  • MuJoCo/MJWarp final roadmap benchmark

Commands actually run:

uv run --no-sync pytest tests/base/test_body_state_copy.py tests/base/test_motrix_backend_options.py tests/base/test_entity_facade.py tests/base/test_mjwarp_backend.py tests/base/test_sim_backend.py -q
make check
make test-all
uv run --no-sync scripts/benchmark/rl/benchmark_offpolicy_collector_active.py --cases sac/g1_motion_tracking/mujoco --num-envs 8192 --warmup-steps 10 --measure-steps 100
uv sync --extra mjwarp
uv run --no-sync scripts/benchmark/rl/benchmark_offpolicy_collector_active.py --cases sac/g1_motion_tracking/mjwarp --num-envs 8192 --warmup-steps 10 --measure-steps 100

Results:

  • focused: 66 passed, 229 deselected
  • make test-all: 2300 passed, 28 skipped, 281 deselected, 1 xfailed; ruff/mypy/pyright and benchmark import smoke passed
  • working tree clean at tested commit a2e08c61bccffb524d071b9947626eda295a62f1
  • Remote CI is intentionally skipped and not awaited under the maintainer/user override recorded in roadmap: motion tracking Numba 热点与统一 body-state copy 收敛 #1304.

Impact

  • Backend impact: Motrix cleanup only in this child; MuJoCo/MJWarp accelerated paths unchanged
  • Platform impact: Linux tested
  • Training effect expected: no numerical/contract change; Motrix returns to the correct non-accelerated adapter
  • Dependency impact: none; motrixsim-core==0.8.2 pin and lock remain unchanged

Artifacts

Final roadmap benchmark on AMD Ryzen 9 9950X3D2 + RTX 4090, 8192 envs, warmup 10 / measure 100, three independent runs:

Backend update_state runs (ms) Median (ms) env/s runs Median env/s vs initial update_state vs initial env/s
MuJoCo 19.963 / 19.986 / 20.564 19.986 79,053 / 76,895 / 74,282 76,895 29.766 → 19.986 (-32.9%) 70,297 → 76,895 (+9.4%)
MJWarp 18.748 / 18.894 / 19.289 18.894 150,488 / 149,283 / 146,083 149,283 28.704 → 18.894 (-34.2%) 122,524 → 149,283 (+21.8%)

Motrix intentionally has no final performance result under the amended scope.

Checklist

  • Added/updated tests at the backend boundary
  • Linked the driving issue
  • Explicitly recorded the Motrix follow-up de-scope
  • No public contract, reward/config, runner/lifecycle, or CI changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant