Plans and reports
A conversion writes two JSON files next to the module. <prefix>_plan.json
holds every choice: the value of each knob for each operator and the kernel
entry each layer calls. <prefix>_report.json explains the plan and never
changes it. Their JSON schemas ship with the documentation data as
plan-schema.json and report-schema.json.
The plan
Section titled “The plan”| Field | What it records |
|---|---|
schema_version |
The file’s schema; see Schema versions. |
generator.helia_aot, generator.cmsis_nn_required |
The heliaAOT release that wrote the plan and the ns-cmsis-nn version the module requires. |
generator.helia_platforms |
The helia-platforms catalog the target’s catalog facts came from: package_version, schema_version, catalog_digest and sources. Absent for a platform without catalog facts, when the catalog could not be loaded (from heliaAOT 1.5.0), and in plans from heliaAOT 1.3 and earlier. |
generator.helia_platforms.sources[] |
Each overlay, side-loaded file or entry point the target’s entries come from: label (overlay:<file>, env:<file> or entry_point:<distribution>, no directory), schema_version, sha256 and distribution_version. A built-in lists none. Two side-loaded files with one name are both listed when one is used (helia-platforms#169). |
model.file, model.sha256, model.subgraph |
The model the plan was made from. |
module_prefix |
The module’s symbol prefix. |
platform.name, platform.cpu, platform.capabilities, platform.supports_fp16 |
The target. name is the platform name as configured or registered. The capabilities are what the release that wrote the plan knew of it; a later release can remove one as well as add one. |
platform.target |
The catalog target platform.name resolved to, by its canonical id: apollo510dL_evb for apollo510l_evb. Absent like generator.helia_platforms. |
optimization.goal, optimization.allow_approximate |
The goal and the approximation gate. |
operators[] |
One entry per operator, below. |
tensors[] |
One entry per constant the operators read, below. |
schedule |
The transfer schedule, below; source: none with no units when nothing streams. |
applies |
The paths the plan applies beyond schedule, below; [] when the conversion read no plan. Absent in plans from heliaAOT 1.7 and earlier. |
optimization.knobs |
Reserved and empty today, for model-level choices. |
Operator ids
Section titled “Operator ids”Each operator has a stable id, "<subgraph>:<output tensor name>", taken
from the name the model gives its first output tensor, so it survives edits
that add or remove other operators. index keeps its position in execution
order and node_id its AIR node id.
- Repeated names get
#1,#2in operator order. An operator without a name falls back to"<subgraph>:<op_type>@<position>";id_sourcesays which applied. - A tensor name can itself contain
:(for example0:StatefulPartitionedCall_1:0), so a parser splits these ids on their first colon only. An id withid_source: node_idis the opaque AIR node id and is not split. operators[].idrules match the stable id as well as the node id, so a plan’s ids can be written back as rules.- A stable id that would also select another operator (another operator’s
node id, or a stable id spelled twice) is not matched; the plan then uses
the node id as
id, withid_source: node_id, and the conversion warns.
Per-operator fields
Section titled “Per-operator fields”| Field | What it records |
|---|---|
| each knob | The value used and the value requested; resolved_by (explicit, or auto_table when auto chose from the goal; plan for a declared knob, entry for a value required by a declared entry); whether the value is approximate where that applies; and the source: operator (with rule, the winning operators entry’s position, type and id), model (set under optimization, even to auto), default or plan. |
kernel.entry |
The ns-cmsis-nn entry the layer calls, repeated in the report under entry. Recorded for layers that choose among candidates (convolution, depthwise, transpose convolution, packed fully connected), for pooling, and for the single-entry paths of convolution, depthwise, transpose convolution, fully connected, batch matmul and SVDF. Other single-entry layers record null. The row records kernel.source as backend or plan when it has an entry. |
kernel.provider |
An opaque string naming the built-in CORE planning rules for those operators. Compare it with another plan’s; do not parse it. Absent from older plans. |
kernel.candidates |
Every eligible entry on this layer and target in precedence order. Ordinary selection takes the first one the knobs allow, except when the shared int8 FC storage comparison chooses standard weights. Under kernel: generic a specialized entry stays listed ahead of the one the layer calls. Null for pooling, batch matmul and SVDF, and in older plans. A fact about the release that wrote the plan. |
kernel.requantization |
For int8 and int16 convolution, depthwise and fully connected: rshift_only when every output channel has a shift below 0 or a multiplier of 0, else general. The int8 MVE kernels read it, and it gates the packed fully connected entry; elsewhere no kernel reads it. Null for float layers, other operators and older plans. |
kernel.local_scratch_bytes |
The resolved local tensors of an operator with a recorded entry, excluding output tensors, constant weight sums and alignment padding. Not the model’s scratch-arena requirement. Older plans can omit it. |
fixed |
Choices that change numerics or speed but are not knobs yet, with what set them (attribute, default, heuristic, knob, placement or plan): RSQRT lut_mode (INT16), HARD_SWISH use_lut and compat_variant (INT8), and the weight layout of eligible fully connected layers and float 1x1 convolutions and conv1d. |
materialized_entry |
The direct symbol that produced this row’s stored constants when multiple live entries exist. Keep it when editing or clearing kernel, including when two candidates use the same weight layout but handle bias differently. Older plans can omit it. |
fixed.weight_layout |
When eligible entries use different layouts, this records the selected entry’s layout. For an int8 FC with two layouts, the kernel policy or declared entry selects packed or standard. An automatic comparison of shared weight storage records set_by: heuristic. For float operators it is set by the knob for fast packed FP16 fully connected, by placement for eligible batch-one FP32 or precise FP16 fully connected, and by a heuristic otherwise. |
Per-constant fields
Section titled “Per-constant fields”tensors[] lists every constant the operators read, by storage root (a
constant interned onto another’s storage is listed under that root), in the
order of its first reader. Plans from heliaAOT 1.3 and earlier write the list
empty.
| Field | Kind | What it records |
|---|---|---|
id, storage_id |
derived | The id memory.tensors rules match; for a constant repacked at conversion, the id it was packed from, with the storage tensor’s own id in storage_id. |
requested |
input under tensors.requested, else derived |
The residency the merged rules ask for (direct, pin or stream, or null). |
residency |
derived | The residency the constant got. A stream request permits streaming: the constant is stream when a schedule unit names it and direct otherwise. |
memory |
derived | Where the bytes are stored. |
destination_memory |
input under tensors.destination_memory, else derived |
For pin, the memory the kernels read the copy from. |
pinned_memory |
derived | The realized destination of a permanent pin, such as DTCM. Keep this observation when editing requested or destination_memory. Other copies and older plans omit it. |
bytes, alignment |
derived | The size, and the alignment the layout pads the constant to, so a planner computes unit sizes and pool fit with the same rule heliaAOT applies. |
unit, pool_offset |
derived | For stream, the transfer unit and the constant’s offset in the stream pool; null otherwise. |
The transfer schedule
Section titled “The transfer schedule”The schedule section lists the transfer units of a conversion whose
constants stream; Streaming constants shows
one written by hand. heliaAOT never searches for a schedule: it reads one
from the plan optimization.plan names, checks it and writes it back with
its derived fields. Input fields come from the plan; derived ones are computed,
and a plan that states one differently is refused.
| Field | Kind | What it records |
|---|---|---|
source |
input | Required: plan with at least one unit, or none with no units. |
pool |
input under schedule.pool, else derived |
The stream pool’s memory, bytes and alignment: from memory.stream_pool or, when applies declares schedule.pool, from the plan, where memory and bytes are input and alignment derived. Null without a pool. |
no_pool |
input | true with a null pool when applies declares schedule.pool and the plan has no pool; absent otherwise. |
units[].id |
input | The unit’s position in the list, which is issue order: by the position of issue_after (null first), then by id. |
units[].tensors |
input | The stored copies the unit copies, each named by its tensors[].storage_id when the entry has one, else its tensors[].id, in tensors[] order. Each streamed copy is in exactly one unit, and only a constant whose rules permit stream. |
units[].pool_offset |
input | The unit’s offset in the pool, a multiple of its span alignment. |
units[].issue_after |
input | The operators[].id after whose run the copy is issued, or null for the start of the run; before the unit’s first reader. |
units[].engine |
input | dma or cpu, among the engines the report lists for the source. |
units[].bytes |
derived | The span size. |
units[].source_memory, units[].source_offset |
derived | The memory the unit’s constants are stored in, and the span’s offset in that memory’s constant arena. |
units[].wait_before, units[].last_reader |
derived | The first and last operator, by position, that reads a constant of the unit. |
How a unit is laid out, the rule a planner computes with:
- Span. Each tensor starts at the next multiple of its
alignmentafter the previous one ends;bytesis the end of the last. The span is the same in the source arena and in the pool. - Span alignment. The largest
alignmentamong the unit’s tensors and, for admaunit, its source’s DMA granule (stream_pool.sources[].granule, 4 bytes for PSRAM on the Apollo510 family).pool_offsetis a multiple of it, and admaunit starts at a multiple of its granule in the source arena too. - Extent.
bytes, rounded up to the granule for admaunit. The extent must fit inpool.bytes, and two units live at once must not overlap in it. - Live range. From the unit’s issue to the end of its last reader’s run. Units whose live ranges do not meet may share pool bytes.
- Pieces. A
dmaunit reaches the provider in pieces split at multiples of the pool memory’s DMA boundary, counted from the pool base. Acpuunit is one copy.
The conversion refuses a schedule that breaks a rule, naming the unit or
tensor; Schedule refusals
lists them. A constant whose rules permit stream and that no unit names
stays direct, with a warning. One that cannot be staged never streams, and
a separate warning names its reason, as the report’s constants[].reason
records it.
Two derived fields are not refused when stated differently:
- a stated
units[].source_offsetis ignored; - from heliaAOT 1.5.0, a stated
schedule.pool.alignmentthat is a multiple of the pool’s alignment is accepted, so a plan written for a release that aligned the pool higher still converts.
Reading a plan as input
Section titled “Reading a plan as input”optimization.plan names a plan to read before the conversion starts. In a
configuration file the path is relative to that file, on the command line to
the working directory. Replay checks the selected subgraph before loading the
model. At the end of planning, it streams the model file once to compute the
SHA-256 recorded in the output plan. A mismatch with the input plan stops
conversion before code is emitted or the destination is replaced.
- The
schedulesection is applied, so it is read strictly: a field heliaAOT does not know underschedule,schedule.poolorschedule.units[]is refused, naming it. Unknown fields elsewhere are ignored, so a tool can annotate the plan outsideschedule. - The converter also applies the declared paths below. Undeclared values follow the comparison rule.
optimization.plan <path> is not an optimization plan this release reads: schedule.units.0: unknown field(s) ['pool'] under schedule, which this release would have to apply.hint: The field comes from a later heliaAOT release or a planner written for one: convert with that release, or remove the field.| Compared | Rule |
|---|---|
model.sha256, model.subgraph, platform.name |
Must match; a null sha256 is refused. |
platform.target |
Compared when the plan has one. A conversion whose catalog facts are absent or could not be loaded refuses a plan that names a target. |
operators[] |
By position: node_id, op_type, and the value of every knob and fixed choice both sides name. A fixed choice set by placement for an operator that reads a constant a unit of the plan’s schedule names is not compared: the schedule decides which memory the kernel reads that constant from. Every other choice is compared. |
tensors[] |
By id and storage_id, when the plan lists any; an entry listed twice is refused. requested, residency, memory, destination_memory, bytes and alignment must match, memory names in any case. |
tensors[] exceptions |
For a constant whose rules permit stream, direct and stream both match. A null memory in the plan is not compared; a null requested or destination_memory is a value and must match. |
Not compared: generator, module_prefix, the optimization section,
operators[].id, id_source and kernel, tensors[].unit and
pool_offset, and fields outside schedule this release does not know. So a
plan from another heliaAOT release is accepted when the comparison passes and
its schedule holds only fields this release knows. A plan with
schedule.source: none replays the conversion that wrote it, and a plan
heliaAOT wrote reads back after only its schedule is edited.
Declared paths
Section titled “Declared paths”A plan applies schedule and every path it lists, once each, in applies. A
plan without applies, or with [] or ["schedule"], is compared exactly as
above. plan-schema.json marks each field of schedule, applies and
tensors[] with x-helia-kind (input or derived) and, where the kind
holds only under a declared path, x-helia-applies naming it.
| Path | What the plan states | What the conversion does |
|---|---|---|
schedule.pool |
schedule.pool: {memory: dtcm, bytes}, or no pool as schedule.pool: null with schedule.no_pool: true |
Reserves that pool in place of memory.stream_pool, or none, and warns when that replaces a configured pool of another size; the module, report and echo follow it, the echo spelling memory as the report does. alignment stays derived and may be omitted only here: copy it from the echo, since heliaAOT 1.4 to 1.7 need it to read the plan. |
tensors.requested |
Each entry’s requested: direct, pin, stream or null |
The stored copy’s request, merged after every memory.tensors rule by the same merge, so the planner, the refusals and the generated code are those of a rule. stream stays a permission the schedule resolves. |
tensors.destination_memory |
Each entry’s destination_memory: a memory, or null |
The stored copy’s destination, merged the same way. State requested: pin with a destination, as a conversion writes it. |
operators.knobs.<name>.value |
The registered knob name and a value on each row marked with both resolved_by: plan and source.kind: plan |
Applies the marked values before packing or allocation. |
operators.kernel.entry |
A symbol on each row marked with kernel.source: plan |
Binds the direct symbol when it is eligible under the final target and placement. |
| any other | Refused, naming the path and the paths this release applies, with the later-release hint. |
To select one layer in a discovery plan, keep the other rows intact. For example,
declare operators.knobs.kernel.value, change that row’s kernel knob to
{"value":"generic","requested":"generic","resolved_by":"plan","source":{"kind":"plan"},"approximate":false},
and clear its kernel record. To bind a symbol directly, declare
operators.kernel.entry, set the row’s kernel.entry and mark its
kernel.source as plan. Pick the symbol from the discovery report.
An explicit entry can select a lower-priority candidate. The conversion keeps
compatible configured knob values. A required change to a configured knob is
recorded as resolved_by: entry. A separately declared knob pin constrains
the entry. A conflicting pin or an approximate choice without optimization.allow_approximate fails.
For each registered knob, the plan schema marks its concrete value property
with the exact declaration (x-helia-applies). The shared KnobChoice
definition uses <name> as a placeholder. When adding a schedule or tensor
declaration, preserve all existing declarations and their row markers.
Each operator declaration needs a matching row marker. The converter checks the
row’s position, stable ID, node ID and operator type before applying it. The echo
keeps explicit markers even for pins equal to the original value. With the same
configuration it replays byte for byte. operators[].constant_roots identifies
the stored copies each layer reads so that a layout change can replace that
layer’s constants. The converter checks a retired copy against its prior storage record,
including its bytes and alignment. To change an entry again, edit its selection
in the emitted plan and retain materialized_entry, the tensor rows and
fixed.weight_layout. The converter resolves the prior symbol with the live provider
and verifies the stored copies. An entry edit can also change an automatic FC reader
sharing those weights. Its recorded layout must match either the reproduced
prior layout or the final layout. Older rows without a prior symbol use a recorded
weight layout where available, then the configured materialization. A knob previously implied by an entry is
recomputed for the new entry. A separately declared knob still constrains it.
When an edit changes a permanent pin, the converter reconstructs the old binding
from the observed residency and pinned_memory and checks the actual allocator
result. The new conversion still uses the declared destination. If an older plan
omits the previous bank, the converter can use a retained or configured binding
that reproduces its observations.
The stored copies determine the edit order.
- If the operator edit keeps every existing stored copy and changing placement would erase the only record of the previous bank, apply placement first. Then select the entry in the emitted plan.
- If the operator edit retires a copy, select the entry from a plan with no
tensors.*paths inapplies. Then declare placement on the copies in the emitted plan. For example, switching an int8 fully connected operator from packed to standard weights retires its packed copy. A placement declaration covers every listed copy, so a request for that retired copy fails.
When the planner selected the old storage arena, the converter reruns that allocation. Complete tensor observations identify an existing transfer group by its members and their relative offsets. Moving the group in the pool or changing its issue order preserves that source layout. These checks establish that the recorded allocation is reproducible. Different sequences of edits can produce the same plan. Placement declarations keep their usual field rules. Other readers retain their comparisons. Tensor declarations and schedule units must reference copies present after conversion.
A tensor declaration applies to the stored copy, so to every operator that reads it, an interned duplicate included. An id rule on the same constant differs: it gives the constant a copy of its own, because interning groups constants by their rules. Declared back unchanged, the plan a conversion wrote reproduces its module; a declared pin gives the module the same pin by an id rule gives, for a constant without interned duplicates.
After placement the conversion checks that every declaration took effect: a
declared pin is a pin into the declared destination, a declared direct or
null is not pinned, and a declared stream is direct or streamed, whichever
planner backend placed. The echo states each declared field as the plan gave it, a
memory in its canonical spelling.
Under a declared pool or tensor path, tensors[].residency and alignment, which placement
decides, are not compared in any entry; they must still have a conversion’s
form (a known residency, a power-of-two alignment). Neither are the declared
fields, nor a choice set by placement of an operator that reads a declared
constant. memory, bytes and the set of listed constants are compared.
A path listed twice in applies is refused. A plan that declares a
tensors path is refused when its tensors[] is empty, two entries name
one stored copy, an entry names a constant the conversion does not read
(before anything is placed), a declared value is not a residency or a memory,
or it declares:
- a destination with
requestedother thanpin, under either path, or a destination alone where amemory.tensorsrule asks fordirectorstream. - a null destination alone where a
memory.tensorsrule pins the constant. - a destination the target lacks, that is read-only, or that is not in
memory.constraints; the refusal names the plan entry’sdestination_memory. pinwithout a destination, or into the constant’s own source memory. Amemory.tensorspin into the source memory is read in place, and its echo recordspinwith no destination: declaredirectfor that constant.- a placement the planner cannot fit; the capacity error’s hint names the declared pins.
- a pin into a memory whose other constants come from another source memory, since one memory’s constants share one source; the refusal names the first declared entry and counts the others.
A plan that declares schedule.pool is refused when:
- it states no pool without
schedule.no_pool, or both a pool and the marker; schedule.no_poolappears without the declaration;- its schedule has units and it declares no pool;
- a listed constant takes its memory from the planner rather than a
memory.tensorsrule, since the pool size would move it. Give constants amemoryrule. The same holds for thetensorspaths, whose pins would move it.
Releases 1.4 to 1.7 read a declaring plan as a record. As input they ignore
applies: they refuse no pool as an unknown schedule.no_pool field with the
later-release hint, a different pool by its derived-pool check, and a changed
request or destination by the comparison. They can accept a declared operator
entry and silently generate a different symbol. Versions 1.8 and 1.9 refuse
unknown operator paths. Before applying an operator plan, check the consuming
converter’s plan schema for each exact path in properties.applies.items.enum,
or pin a release that advertises it. The plan’s generator version identifies
the writer only.
The catalog stamp
Section titled “The catalog stamp”The module README and the build files (nsx-module.yaml, the CMakeLists.txt
files and the Zephyr Kconfig) state the same catalog under their “Generated
by heliaAOT” line, for a platform with catalog facts:
Platform facts: helia-platforms 0.2.0, catalog 8866b375; overlay:my_apollo510_board.yaml 85bdf21bThe digests are the first 8 hexadecimal digits of catalog_digest and of each
source’s sha256. The line is printable ASCII: a line break or other control
character in a file name is written as an escape such as \n, so it stays one
comment line. The C and H sources, the CMSIS pack and the HTML report do not
carry it.
The report
Section titled “The report”<prefix>_report.json explains the plan and never changes it: each
operator’s MACs, the alternatives of each knob and whether they apply on this
target, the measurements for this target and CPU, the constant placement
facts, the hints the results print, folded_variables, the constants each
operator reads with whether they could be staged into a stream pool, and the
stream pool with the schedule’s pieces. Its content may change between
releases, except the
stable report fields.
The optional HTML report (documentation.html) shows the plan’s
kernel.local_scratch_bytes as the local-scratch column of its execution
table.
- A hint appears only when its alternative applies and a single setting would
select it. A knob hint lists the operators where the knob applies that do
not run the value
autopicks forgoal: latencywithallow_approximate: true, leaving out operators anoperatorsrule pins. - The placement hint needs constants outside TCM that all come from one cold memory and fit in the free DTCM.
- Share of MACs counts convolution, depthwise and fully connected layers; it is not a share of run time unless you profile the model.
Fields for a planner
Section titled “Fields for a planner”| Field | What it says |
|---|---|
operators[].entry_source, knobs.<knob>.value, source, resolved_by |
The applied entry’s origin, the applied knob value, its request’s origin and how the converter resolved it. |
operators[].candidates[].shared_weight_group_bytes |
For a shared MVE int8 FC matrix, the distinct bytes occupied by the matrix and its FC parameters if this reader uses that candidate and every other reader keeps its selected entry. The count includes the matrix’s other FC readers and their parameters, group payloads that other matrices or activation views keep live, and padding inside packed streams. Arena alignment, descriptors and inline scalar parameters are excluded. Compare alternatives within a row. Summing across its readers repeats the same group. Null or absent when unassessed. |
operators[].candidates[] |
One record per eligible direct entry. local_scratch_bytes includes all distinct local scratch buffers. Zero means no scratch. weight_layout is packed or standard for this candidate. requantization_requirement is rshift_only for the packed int8 FC stream and any for either route. Null means the requirement is inapplicable. A null candidate list means enumeration is unavailable. |
operators[].knobs.<knob>.approximate |
The alternatives the plan would record approximate: true for if the operator ran them. Empty where the knob does not apply. |
operators[].constants[] |
Each constant the operator reads, with bytes, alignment, stageable and, when it cannot be staged, reason; fixed names why its storage cannot be shared or rebound (persistent_state, arena_offset, ethos_u_stream or model_input, for it or a constant that shares its storage), null otherwise. A pin stages a fixed constant as any other, and every reader, an Ethos-U command stream included, reads the staged copy. |
stream_pool.sources[] |
Each memory a constant can stream from that the target has (MRAM, PSRAM, in that order), with the engines a unit from it may name and its DMA granule (1 where it offers no dma). A memory the CPU cannot read lists no engine. Compare memory names in any case. |
stream_pool.dma_boundary |
The DMA boundary of the pool’s memory, where pieces are split (4096 for DTCM on the Apollo510 family); null where the memory states none, and then no source offers dma. |
stream_pool.alignment |
The pool’s alignment, which the application aligns its buffer to. From heliaAOT 1.5.0 it includes the DMA boundary only where a source offers dma into the pool. |
stream_pool.pieces_in_flight |
From heliaAOT 1.5.0: the most dma pieces a run has issued and not waited for, equal to <prefix>_transfer_pieces_in_flight; 0 without dma units. Build the provider’s queue from it. |
placement.memories[] |
Each memory the planner places in, in the order of memory.constraints (the target’s preferred order without it), then any other memory the plan or the stream pool takes bytes in, with its platform size (bytes), its budget (max_size where set, else the memory’s size), the bytes used, the stream pool bytes in it, free, which is budget less used, and whether it is writable. Where the target states no size for a memory, which a third-party planner backend can place an arena in, bytes, budget and free are null. used and pool are always stated. used counts every arena in the memory, the source copy of every constant staged from it, and the pool, as the bundled planners charge them. free is headroom, not a promise of admission: a pin needs its bytes with its slot’s alignment padding within the destination’s free (more may fit where another writable memory takes the scratch it displaces), its padded source copy within the source memory’s free when it is staged, and the other placement rules, such as one source memory per constant memory and the schedule’s, still apply. The HTML report’s memory figures add arena guard bytes, which no budget counts. |
The platform size in each placement row comes from the registered or custom
profile, including any memory size override. On a catalog target it is the
contiguous mapped size after platform.reserve. For example, the registered
apollo510_evb gives DTCM 507,904 bytes in its linker region. The catalog
gives it 524,288 bytes, or 507,904 with a 16,384-byte reserve. A
memory.constraints limit of 131,072 changes the row’s budget and leaves
bytes at the platform size. A reader gets None both for a missing bytes
key in older reports and for an explicit null. Check key presence in the JSON
row to distinguish them.
Each placement row’s external flag follows the resolved catalog region’s
attachment. Without a unique attachment, the planner treats PSRAM and DRAM
as external. The row’s cache_line gives the D-cache line in bytes when this
memory is external and the target core has a known line. Otherwise it is null.
The bundled planners lay out a pinned constant arena using each slot’s
alignment at its destination. The report gives that alignment for the
current placement. When pricing a different destination, use the greater
of the tensor’s required alignment and that destination’s alignment floor
(memory.constraints[].arena_alignment can raise the floor).
If either endpoint supplies a cache line, round the final slot end up to that line once. With no line at either endpoint, use the final slot end. A staged arena costs that many bytes in each endpoint. An arena stored and read in the same memory is charged once.
For example, two 5-byte slots aligned to 16 bytes in PSRAM end at byte 21 (exclusive). A 32-byte cache line gives a 32-byte charge. Staging those slots in SRAM with a 64-byte alignment floor places them at offsets 0 and 64. The new end is 69, so the copy costs 96 bytes in PSRAM and 96 in SRAM.
A custom planner backend can reserve a larger arena. Its charge uses
the backend’s full arena extent (arena.used), including any trailing
padding, at each applicable endpoint.
A report from an earlier release lacks a field that release did not write; read that as unknown, not as empty.
report-schema.json refuses a repeated entry in approximate or in a
source’s engines, a non-empty approximate where the knob does not apply,
a source granule other than 1 where engines holds no dma, and a null
dma_boundary where a source’s engines hold dma.
Checked by heliaAOT, not by the schema, because JSON Schema cannot compare one
field with another or test for a power of two:
- in
approximate, each entry is one of the entry’s alternatives; - in
approximate, the entries follow the order of alternatives; - in
dma_boundary, it is a power of two; - in
dma_boundary, it is a multiple of the granule of every source whose engines hold dma.
On an NPU-equipped Atomiq target, placement.npu_reach[] lists every physical
memory, including unused banks. Each row gives its memory, reachable, and
requires_cm55_awake. The application can set platform.cm55_during_npu to
awake when the CM55 will stay awake through every invocation, including the
driver wait. Atomiq supplies reach for every physical memory by default. An
explicit catalog access denial overrides that default. On stock AT110, only
ITCM and DTCM require the CM55 to stay awake. With may_sleep or the default
undeclared, the planner excludes both for NPU reads and writes. On a custom
target, AOT also honors explicit NPU power prerequisites in the catalog.
A region that requires another master to stay awake is ineligible for NPU
placement because the application declaration covers only the CM55.
Automatic placement prefers other eligible memory even with awake. CPU-only
allocations keep their configured order. Apollo5 reports omit the reach table,
including conversions for an externally modeled accelerator.
An operator’s ordered execution[] records its phase, provider and
boundary. Run boundaries are cpu_call (CPU), driver_invoke (Ethos-U),
or fence (CPU). A fence counts as zero NPU invocations whether it copies or
aliases its input. Match each constant’s allocation_ids[] to
placement.allocations[].id within the same report. Each slice gives the
runtime arena ID, memory, offset and byte count. Descriptors with the same
arena, offset and byte count share one allocation ID. A staged or streamed read
references the destination, including when the driver reads a command stream.
Each budget’s physical_memories[] identifies the contiguous physical regions
behind it when the CPU and NPU address the same bytes through the budget’s
configured window. A catalog override can map the same pointer to different
banks or offsets for the two masters. A partially shared budget omits its budget-wide
guarantee. A driver buffer can still use a shared portion large enough for its
complete byte range. Each resolved slice lists the regions its complete byte range
intersects, in address order. Compare names to the reach rows by exact equality
and check every region against placement.cm55_during_npu. Caller-bound
addresses and linker-dependent bank choices omit the slice list. The Ethos-U
driver can also replace base slot 2 with its fast-memory area. That slice omits
the physical list even with internal arenas. The generated check uses the
actual replacement address and the slot’s full extent. Configuring a
stream pool exposes the bind API for every arena, including generated arenas. Generated
Ethos-U code checks the actual pointers before reserving the driver and returns
an error if a binding lies outside its eligible range.
The report’s stable fields and both files’ schema_version rules are on the
compatibility page, under
Machine-readable files.
Generated CORE calls
Section titled “Generated CORE calls”The report’s kernel_calls records the CORE functions each operator’s
generated source calls, including batch matmul’s operand transposes, SVDF’s
kernel-sum call and the shared ADD/MUL helpers. Each calls entry holds a
symbol and the plan’s operator_ids; symbols are sorted.
- An operator that calls no CORE function, such as DILATE or an Ethos-U
command stream, records none. A call compiled only under
ARM_MATH_MVEIis recorded on every target. Initialization calls are included when emitted. - The records list direct generated calls, not the functions those entries
call internally or the linked image.
unrecorded_operator_idslists operators without call coverage, so a partial list is not the module’s complete dependencies. - Older reports have no
kernel_calls, read as null, which differs from an empty, covered list. The record changes no selection or numerical behavior.
FP16 overflow thresholds
Section titled “FP16 overflow thresholds”A packed FP16 convolution on arm_convolve_1x1_f16 or arm_convolve_1_x_n_f16
sums each output in float16 lanes: the bias and the first 32 taps, then each
later block of 32 taps, each folded into float32. A block partial that reaches
65504 overflows whatever a later block subtracts, so unnormalized data fed
straight from a model input can overflow where the standard layout would not.
The report’s fp16_overflow lists each such layer whose input is a model
input read through value-preserving operators only (RESHAPE, SQUEEZE,
EXPAND_DIMS, TRANSPOSE, SLICE, STRIDED_SLICE, and PAD with a zero fill
value). Each entry names the operator, its entry, the model input, the
operator types on the path, and threshold: the input magnitude below which
no sign pattern can make any lane block reach 65504, allowing for float16
rounding.
- After
nround-to-nearest fused multiply-adds a block partial is at most(1 + g)times the exact sum of magnitudes, withg = n·u / (1 − n·u)andu = 2^-11(nis the block’s taps, plus one for the bias in block 0). - The threshold is
(65504 / (1 + g) − |bias|) / sum|w|over the first block and65504 / (1 + g) / sum|w|over each later one, minimized over output channels and blocks, with thechannel,block,weight_sumandbiasattaining it. - Above it, the worst sign pattern overflows within about 2%; typical data is far below it. Below it no lane block overflows, but the layer’s output can still exceed the float16 range, as on any float16 kernel.
- A layer on another entry, with standard weights, or fed through any other operator or a constant is not listed. The list changes no generated code and no conversion decision.