Skip to content
heliaAOT
API Reference
HELIA HUB

TensorAttributes

Machine-readable model

  • TensorAttributesclassThis class provides the baseline set of tensor attribute rules.
class

This class provides the baseline set of tensor attribute rules.

helia_aot/memory/defines.py:488

TensorAttributes()

This class provides the baseline set of tensor attribute rules.

attribute

memory

Python

helia_aot/memory/defines.py:522

memory: MemoryType | None = Field(default=None, description='Memory placement for tensors; None lets the planner choose')

Memory placement for tensors. For constants this is the source (cold-storage) memory where the tensor’s bytes live in the image. When constant_destination_memory is set and differs from memory, the runtime arena lives in that destination memory and a hydration copy is required; otherwise the arena lives in memory itself and is read-only (cold). When None (default), no rule pins the tensor and the planner chooses the memory, as it does for a tensor no rule matches; for a staged constant it chooses the source memory.

attribute

helia_aot/memory/defines.py:525

constant_destination_memory: MemoryType | None = Field(default=None, description='Per-tensor runtime destination memory for constants. When None (default) the constant is read in place from its source memory; when set the constant is hydrated into a writable arena slot in the destination memory.')

Override the runtime (kernel-visible) memory for a constant. Required only when the runtime memory must differ from the source memory (e.g. weights stored in MRAM but read from DTCM/SRAM at runtime). When None (default), the runtime memory equals memory and no hydration step is needed. Must reference a writable memory of the target platform when set.

attribute

residency

Python

helia_aot/memory/defines.py:534

residency: Residency | None = Field(default=None, description="How a constant reaches its readers: direct (read in place), pin (copied once at init into constant_destination_memory) or stream (permits streaming: copied into the stream pool before its first reader when the plan's schedule names it, otherwise direct). constant_destination_memory implies pin.")

How a constant reaches the operators that read it: direct (read in place), pin (copied once at init into constant_destination_memory, which it requires) or stream (permits streaming: copied into the stream pool before its first reader when the plan’s schedule names it, otherwise direct). Setting constant_destination_memory implies pin at the same rule’s precedence; one rule cannot pair it with direct or stream. Applies to constants only.