class
TensorAllocation
PythonMetadata for a tensor allocation.
TensorAllocation()Metadata for a tensor allocation.
Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.
attribute
tensor_id
Pythontensor_id: TensorId = Field(..., description='Unique identifier for the tensor')Unique identifier for the tensor
attribute
memory
Pythonmemory: MemoryType = Field(..., description='Memory type for the allocation')Memory type for the allocation (runtime / kernel-visible memory of the arena slot)
attribute
offset
Pythonoffset: int = Field(default=0, description='Offset within the memory arena')Offset within the arena
attribute
size
Pythonsize: int = Field(default=0, description='Size of the allocation in bytes')Size of the allocation in bytes
attribute
binding
Pythonbinding: 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).