unisim.backend.motrix.tensor¶
Persistent packed tensor transfers for the MotrixSim CPU host bridge.
Functions
|
Validate the intentionally narrow MotrixSim tensor profile. |
|
Copy one authoritative CPU sensor block to a Torch device. |
|
Bridge selected reset through one persistent packed direct-API plan. |
|
Commit full-width reset tensors selected by a backend-owned bool mask. |
|
Copy requested state blocks to one Torch device in one packed H2D. |
|
Bridge control through one persistent packed direct-API plan. |
|
Return the deliberately narrow MotrixSim tensor capability matrix. |
Classes
One stable MotrixSim layout for explicit accelerator/CPU boundaries. |
- class unisim.backend.motrix.tensor.MotrixHostBridgeTransferPlan[source]¶
Bases:
HostBridgeTransferPlanOne stable MotrixSim layout for explicit accelerator/CPU boundaries.
MotrixSim remains CPU-authoritative. Control, reset, and packed reads each cross the device boundary at most once. CUDA transfers follow and synchronize the caller’s current Torch stream.
- Parameters:
backend (
MotrixBackend)spec (
TensorIOSpec)
- __init__(backend, spec)[source]¶
- Parameters:
backend (
MotrixBackend)spec (
TensorIOSpec)
- property spec: TensorIOSpec¶
Return the immutable layout request used to compile this plan.
- property transfer_stats: dict[str, int]¶
Return cumulative semantic transfer and synchronization counters.
- apply_reset(env_indices, qpos, qvel, randomization=None)[source]¶
Pack selected reset rows once, D2H them, and commit CPU physics.
- unisim.backend.motrix.tensor.require_motrix_tensor_runtime(backend, *, require_callback_free=False)[source]¶
Validate the intentionally narrow MotrixSim tensor profile.
- Parameters:
backend (
MotrixBackend)require_callback_free (
bool)
- Return type:
- unisim.backend.motrix.tensor.sensor_view(backend, name, device)[source]¶
Copy one authoritative CPU sensor block to a Torch device.
- Parameters:
backend (
MotrixBackend)name (
str)
- Return type:
- unisim.backend.motrix.tensor.set_state_tensor(backend, env_indices, qpos, qvel, randomization=None)[source]¶
Bridge selected reset through one persistent packed direct-API plan.
- unisim.backend.motrix.tensor.set_state_tensor_mask(backend, reset_mask, qpos, qvel, randomization=None, *, full_refresh=False)[source]¶
Commit full-width reset tensors selected by a backend-owned bool mask.
- unisim.backend.motrix.tensor.state_views(backend, fields, device)[source]¶
Copy requested state blocks to one Torch device in one packed H2D.
- unisim.backend.motrix.tensor.step_tensor(backend, ctrl, nsteps=1)[source]¶
Bridge control through one persistent packed direct-API plan.
- Parameters:
backend (
MotrixBackend)ctrl (
Any)nsteps (
int)
- Return type:
- unisim.backend.motrix.tensor.tensor_capabilities(backend)[source]¶
Return the deliberately narrow MotrixSim tensor capability matrix.
- Parameters:
backend (
MotrixBackend)- Return type:
TensorLifecycleCapabilities