unisim.backend.isaacsim.tensor_ipc

IsaacSim-owned CUDA IPC tensor arena and stream protocol.

This module is intentionally IsaacSim-specific. It uses the SDK-free raw CUDA IPC primitive for bulk storage/events, while control messages and lifecycle negotiation remain on the existing worker pipe. It does not alter the model-file CPU shared-memory protocol.

Event ownership is directional: the host records control_event after its D2D control write, records reset_event after a D2D selected-reset write, and the worker records state_event after enqueueing native state projections. Each host consumer stream waits on state_event. Worker pipe READY is a process-health acknowledgement, not a CUDA data barrier.

Functions

import_torch()

require_cuda_tensor(tensor, *, rank, name)

require_cuda_tensor_of_dtype(tensor, *, ...)

Classes

HostCudaIpcArena

Producer-owned canonical arena exported to the IsaacSim worker.

IsaacSimCudaArenaLayout

Fixed, 256-byte-aligned public tensor layout.

RawCudaTensorView

A stable Torch view created through public DLPack, not private storage.

RawCudaViewToken

Release callback owned by a public DLPack tensor view.

WorkerCudaIpcArena

Worker-side imported mapping of the canonical host arena.

class unisim.backend.isaacsim.tensor_ipc.RawCudaViewToken[source]

Bases: object

Release callback owned by a public DLPack tensor view.

Parameters:

on_release (Optional[Callable[[], None]])

__init__(on_release=None)[source]
Parameters:

on_release (Optional[Callable[[], None]])

release()[source]
Return type:

None

unisim.backend.isaacsim.tensor_ipc.import_torch()[source]
Return type:

Any

class unisim.backend.isaacsim.tensor_ipc.IsaacSimCudaArenaLayout[source]

Bases: object

Fixed, 256-byte-aligned public tensor layout.

Parameters:
  • num_envs (int)

  • nq (int)

  • nv (int)

  • nu (int)

  • nbody (int)

  • qpos_offset (int)

  • qvel_offset (int)

  • ctrl_offset (int)

  • reset_env_indices_offset (int)

  • reset_qpos_offset (int)

  • reset_qvel_offset (int)

  • reset_kp_offset (int)

  • reset_kd_offset (int)

  • body_state_offset (int)

  • sensor_state_offset (int)

  • size_bytes (int)

num_envs: int
nq: int
nv: int
nu: int
nbody: int
qpos_offset: int
qvel_offset: int
ctrl_offset: int
reset_env_indices_offset: int
reset_qpos_offset: int
reset_qvel_offset: int
reset_kp_offset: int
reset_kd_offset: int
body_state_offset: int
sensor_state_offset: int
size_bytes: int
classmethod create(num_envs, nq, nv, nu, nbody=0)[source]
Parameters:
Return type:

IsaacSimCudaArenaLayout

property shapes: dict[str, tuple[int, ...]]
property dtypes: dict[str, str]
to_wire()[source]
Return type:

dict[str, int]

classmethod from_wire(value)[source]
Parameters:

value (Any)

Return type:

IsaacSimCudaArenaLayout

__init__(num_envs, nq, nv, nu, nbody, qpos_offset, qvel_offset, ctrl_offset, reset_env_indices_offset, reset_qpos_offset, reset_qvel_offset, reset_kp_offset, reset_kd_offset, body_state_offset, sensor_state_offset, size_bytes)
Parameters:
  • num_envs (int)

  • nq (int)

  • nv (int)

  • nu (int)

  • nbody (int)

  • qpos_offset (int)

  • qvel_offset (int)

  • ctrl_offset (int)

  • reset_env_indices_offset (int)

  • reset_qpos_offset (int)

  • reset_qvel_offset (int)

  • reset_kp_offset (int)

  • reset_kd_offset (int)

  • body_state_offset (int)

  • sensor_state_offset (int)

  • size_bytes (int)

class unisim.backend.isaacsim.tensor_ipc.RawCudaTensorView[source]

Bases: object

A stable Torch view created through public DLPack, not private storage.

Parameters:
__init__(*, torch, pointer, shape, device_index, dtype='float32', token=None)[source]
Parameters:
property tensor: Any
unisim.backend.isaacsim.tensor_ipc.require_cuda_tensor(tensor, *, rank, name)[source]
Parameters:
Return type:

None

unisim.backend.isaacsim.tensor_ipc.require_cuda_tensor_of_dtype(tensor, *, rank, name, dtype)[source]
Parameters:
Return type:

None

class unisim.backend.isaacsim.tensor_ipc.HostCudaIpcArena[source]

Bases: object

Producer-owned canonical arena exported to the IsaacSim worker.

Parameters:
__init__(*, num_envs, nq, nv, nu, nbody, device='cuda')[source]
Parameters:
property qpos: Any
property device_uuid: str
property qvel: Any
property device_index: int
property ctrl: Any
property reset_env_indices: Any
property reset_qpos: Any
property reset_qvel: Any
property reset_kp: Any
property reset_kd: Any
property body_state: Any
property sensor_state: Any
to_payload(sensor_descriptors=None)[source]
Parameters:

sensor_descriptors (list[dict[str, Any]] | None)

Return type:

dict[str, Any]

write_control(ctrl)[source]
Parameters:

ctrl (Any)

Return type:

None

record_control()[source]
Return type:

None

write_reset(env_indices, qpos, qvel, randomization=None)[source]
Parameters:
Return type:

None

record_reset()[source]
Return type:

None

wait_state()[source]
Return type:

None

close()[source]
Return type:

None

class unisim.backend.isaacsim.tensor_ipc.WorkerCudaIpcArena[source]

Bases: object

Worker-side imported mapping of the canonical host arena.

Parameters:
__init__(payload, *, device_index)[source]
Parameters:
property qpos: Any
property qvel: Any
property ctrl: Any
property reset_env_indices: Any
property reset_qpos: Any
property reset_qvel: Any
property reset_kp: Any
property reset_kd: Any
property body_state: Any
property sensor_state: Any
property device_uuid: str
wait_control()[source]
Return type:

None

record_state()[source]
Return type:

None

wait_reset()[source]
Return type:

None

close()[source]
Return type:

None