Skip to content
heliaAOT
API Reference
HELIA HUB

MemoryConstraint

Machine-readable model

class

User-defined memory constraint

helia_aot/memory/defines.py:319

MemoryConstraint()

User-defined memory constraint

attribute

max_size

Python

helia_aot/memory/defines.py:343

max_size: int | None = Field(default=None, description='Maximum size in bytes, or None for no limit')

Maximum size in bytes, or None for no limit

attribute

helia_aot/memory/defines.py:344

arena_alignment: int | None = Field(default=None, description='Optional per-arena alignment floor in bytes. When set, applied to both the arena base symbol and every slot. When None, only the 16-byte implementation floor applies to the base; per-slot alignment is driven by platform / dtype / tensor hints.')

Optional per-arena alignment floor in bytes. When set, the planner uses max(arena_alignment, platform.min_alignment) for both the arena base symbol and the per-slot offset of every tensor packed into it. When None (the default), only the implementation floor (16 bytes) is applied to the arena base symbol; per-slot alignment continues to use max(platform.min_alignment, dtype_alignment_floor, tensor.alignment_hint) so dtype-natural and kernel-driven alignment are still honored. Bump arena_alignment above the default for memories that back DMA-driven hydration paths needing stronger alignment than the platform’s MVE/Helium floor (e.g. cacheline-sized PSRAM transfers).