Skip to content
heliaAOT
HELIA HUB

defines

Machine-readable model

class

SoC available capabilities

helia_aot/platforms/defines.py:9

SocCapability()

SoC available capabilities

class

SoC available memory types

helia_aot/platforms/defines.py:22

MemoryType()

SoC available memory types

attribute

Whether the INIT placement for this memory targets loadable RAM.

helia_aot/platforms/defines.py:48

is_init_ram: bool

Whether the _INIT placement for this memory targets loadable RAM.

Memories whose *_INIT linker macro places symbols into loadable RAM (i.e. the section is writable at the linker level, with bytes copied from a load region at boot) cannot be declared const at the C type level — GNU ld will otherwise infer a read-only section group, refuse to merge with the writable RAM section, and orphan the symbol into an unrelated output section.

method

C const prefix appropriate for an INIT blob in this memory.

helia_aot/platforms/defines.py:66

init_const_qualifier() -> str

C const prefix appropriate for an _INIT blob in this memory.

Returns "const " for memories whose init section is read-only at link time (flash/XIP), and "" for memories whose init section is loadable RAM (where const would cause a section-flag conflict — see :attr:is_init_ram).

Returns of init_const_qualifier
ValueTypeDescription
strstrEither ``"const "`` or the empty string. Suitable
strfor direct interpolation in templates.
method

Convert memory placement to C qualifiers

helia_aot/platforms/defines.py:80

to_qualifiers(prefix: str = 'AOT', init: bool = False, writable: bool = True) -> str

Convert memory placement to C qualifiers

Parameters of to_qualifiers
NameTypeDefaultDescription
prefixstr'AOT'Prefix for the qualifier macro
initboolFalseFor pre-initialized data (aka .data) vs zeroed (.bss)
writableboolTrueWhether the data will be written to at runtime
Returns of to_qualifiers
ValueTypeDescription
strstrC qualifier macro (e.g., AOT_PUT_IN_SRAM_INIT)
class

Base class for SoC platforms

helia_aot/platforms/defines.py:129

SocPlatform()

Base class for SoC platforms

attribute

Whether this platform supports Armv8.1-M MVE-FP / FP16 kernels.

helia_aot/platforms/defines.py:172

supports_fp16: bool

Whether this platform supports Armv8.1-M MVE-FP / FP16 kernels.

Resolution order:

  1. When :attr:SocCapability.FP16 is declared explicitly, it is honored as a platform/toolchain capability. It is rejected only when it contradicts a known non-FP16 core (_NON_FP16_CPUS, e.g. Cortex-M4/M7/M33); unknown or custom CPUs are trusted so bespoke or future MVE-FP targets can opt in through the extension point without a library change.
  2. When the capability is absent, FP16 is inferred from a normalized (case-insensitive) match of :attr:cpu against the known FP16-capable cores (_FP16_CPUS) for backward compatibility with platforms that only set cpu.
attribute

Whether this platform declares an attached NPU (Arm Ethos-U).

helia_aot/platforms/defines.py:212

supports_npu: bool

Whether this platform declares an attached NPU (Arm Ethos-U).

Unlike :attr:supports_fp16 there is no CPU-based inference: the NPU is a discrete accelerator that cannot be deduced from the core, so the capability must be declared explicitly via :attr:SocCapability.NPU. Operators that generate NPU-only code (e.g. the Ethos-U custom operator) use this to reject conversion for platforms without an accelerator at convert time, instead of failing later in the integrator’s build.