Skip to content
heliaAOT
API Reference
HELIA HUB

TensorBinding

Machine-readable model

  • TensorBindingclassPlanner's emit intent for a single tensor's storage.
class

Planner's emit intent for a single tensor's storage.

helia_aot/memory/defines.py:99

TensorBinding()

Planner’s emit intent for a single tensor’s storage.

Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.

Every tensor in a :class:MemoryPlan is bound to an arena slot at (role, memory, offset). There are no per-tensor C symbols anymore — scratch, persistent, and constant tensors are all descriptors against arena buffers exposed via arena_buffers[region].

Constant arenas come in two shapes, distinguished purely by whether source_memory matches memory:

  • Cold (source_memory == memory): the arena buffer itself is a static const blob in cold storage. Kernels read it directly; no hydration is required.
  • Staged (source_memory != memory): the arena buffer is a writable runtime copy in memory; a separate read-only source blob lives in source_memory and the caller (or the weak <prefix>_hydrate_constants helper) copies it in before the first model_run.

Scratch and persistent bindings always have source_memory == memory (they are writable arenas with no cold-storage source).

attribute

helia_aot/memory/defines.py:138

source_memory: MemoryType = Field(..., description='Cold-storage memory the slot is sourced from.')

Cold-storage memory the slot is sourced from. Equals memory for scratch, persistent, and cold constants; differs from memory for staged constants.