Conversation
Migrate the MotrixSim write path onto batched native write programs:
every declarative write compiles into a single plan and execution is
one native_program.execute call.
- migrate the compiler onto the batched compile_write FFI plan and
upgrade motrixsim to 0.10.1.dev124285, whose WriteProgram.execute no
longer takes forward_kinematic: reset/FK behavior is baked into the
plan via SceneModel.compile_write(reset=, forward_kinematic=)
- split the fused MocapPoseWrite (N,B,7) contract into
MocapPositionWrite (N,B,3) + MocapRotationWrite (N,B,4), both compiled
to native BodyPosition/BodyRotation (bit-identical to mocap.set_pose);
_MultiTargetOp removed; four envs migrated
- JointPositionWrite/JointVelocityWrite compile to native
BodyJointPosition/BodyJointVelocity joint-name sources
- adopt the new ball joint sources from
core/motphys-articulated-body#2106 (MR !1755): add neutral
JointQuaternionWrite (xyzw, normalized on write) and
JointAngularVelocityWrite; migrate peg-insert off the multi-DoF
BodyJointPositionWrite("free_peg") fusion
- remove DofPositionWrite/DofVelocityWrite (zero users) and the legacy
Python pipeline they propped up: _DofChannelOp, _ResetPatchOp,
_DofComponentPatchOp, _execute_reset, and the masked_rows callback;
body-joint writes on multi-DoF bodies now fail loudly pointing at the
per-quantity writes; native plan reset also clears per-instance
overrides not covered by the plan
- _MotrixSimWriteProgram reduces to env_ids validation plus one native
execute
Full suite: 885 passed, 4 skipped.
wlgys8
force-pushed
the
perf/write-compiler-ffi-plan
branch
from
September 19, 2026 08:34
09b6b93 to
c5cd1c0
Compare
Contributor
Author
|
Superseded: this work was rebased onto the newer native write plan implementation; continuing in the new PR from perf/native-write-plan. |
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.
Closes #20
Summary
0.10.1.dev123565, whosecompile_writesupports compile-timeresetandforward_kinematicflagsWritePlan; each execute scatters in a single FFI call, applies the native reset first when compiled withreset=True, and refreshes kinematics at most onceBodyPosition/BodyRotationfields;buffer(name)synthesizes the neutral(N, B, 7)layout as one zero-copy slice, so consumers are unchangedset_dof_pos/set_dof_velsetters:SceneDataproperty projections are read-only copies, so in-place patches never reached the sim state_MultiTargetOp(unused after the migration) and the post-reset op branch (all remaining numpy ops fold into the reset state)Test plan
prek runclean on changed files