# helia_aot.memory.defines.TensorAllocation

## helia_aot.memory.defines.TensorAllocation

`class` · `python`

```python
TensorAllocation()
```

Metadata for a tensor allocation.

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

Source: `helia_aot/memory/defines.py:182`

### helia_aot.memory.defines.TensorAllocation.tensor_id

`attribute` · `python`

```python
tensor_id: TensorId = Field(..., description='Unique identifier for the tensor')
```

Unique identifier for the tensor

Source: `helia_aot/memory/defines.py:202`

### helia_aot.memory.defines.TensorAllocation.memory

`attribute` · `python`

```python
memory: MemoryType = Field(..., description='Memory type for the allocation')
```

Memory type for the allocation (runtime
/ kernel-visible memory of the arena slot)

Source: `helia_aot/memory/defines.py:203`

### helia_aot.memory.defines.TensorAllocation.offset

`attribute` · `python`

```python
offset: int = Field(default=0, description='Offset within the memory arena')
```

Offset within the arena

Source: `helia_aot/memory/defines.py:204`

### helia_aot.memory.defines.TensorAllocation.size

`attribute` · `python`

```python
size: int = Field(default=0, description='Size of the allocation in bytes')
```

Size of the allocation in bytes

Source: `helia_aot/memory/defines.py:205`

### helia_aot.memory.defines.TensorAllocation.binding

`attribute` · `python`

```python
binding: TensorBinding | None = Field(default=None, description="Planner-assigned binding describing how this tensor's storage is materialized.")
```

Planner's binding describing
``(role, memory, offset, source_memory)`` for the slot.
Defaults to ``None`` for callers that construct
:class:`TensorAllocation` directly; the bundled
:class:`GreedyMemoryPlanner` always populates it. Emit
templates dispatch on ``binding.role`` and on the
``binding.source_memory == binding.memory`` predicate
(cold vs staged constant).

Source: `helia_aot/memory/defines.py:206`
