helia-ethos 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- helia_ethos-0.2.0/.gitignore +7 -0
- helia_ethos-0.2.0/CHANGELOG.md +46 -0
- helia_ethos-0.2.0/LICENSE +52 -0
- helia_ethos-0.2.0/NOTICE +13 -0
- helia_ethos-0.2.0/PKG-INFO +334 -0
- helia_ethos-0.2.0/README.md +247 -0
- helia_ethos-0.2.0/docs/extraction_contract.md +332 -0
- helia_ethos-0.2.0/docs/port_mapping.md +102 -0
- helia_ethos-0.2.0/docs/preparation.md +140 -0
- helia_ethos-0.2.0/docs/releasing.md +30 -0
- helia_ethos-0.2.0/docs/soc_design_notes.md +40 -0
- helia_ethos-0.2.0/pyproject.toml +103 -0
- helia_ethos-0.2.0/scripts/check_distribution.py +77 -0
- helia_ethos-0.2.0/scripts/gates.py +22 -0
- helia_ethos-0.2.0/src/helia_ethos/__init__.py +231 -0
- helia_ethos-0.2.0/src/helia_ethos/_optional.py +14 -0
- helia_ethos-0.2.0/src/helia_ethos/catalog.py +80 -0
- helia_ethos-0.2.0/src/helia_ethos/catalog_identity.py +64 -0
- helia_ethos-0.2.0/src/helia_ethos/catalog_loading.py +105 -0
- helia_ethos-0.2.0/src/helia_ethos/catalog_policy.py +211 -0
- helia_ethos-0.2.0/src/helia_ethos/fencing.py +781 -0
- helia_ethos-0.2.0/src/helia_ethos/fvp.py +195 -0
- helia_ethos-0.2.0/src/helia_ethos/model.py +323 -0
- helia_ethos-0.2.0/src/helia_ethos/model_policies/atomiq110.yaml +133 -0
- helia_ethos-0.2.0/src/helia_ethos/npu_reference.py +43 -0
- helia_ethos-0.2.0/src/helia_ethos/pmu.py +505 -0
- helia_ethos-0.2.0/src/helia_ethos/preparation/__init__.py +47 -0
- helia_ethos-0.2.0/src/helia_ethos/preparation/inspection.py +174 -0
- helia_ethos-0.2.0/src/helia_ethos/preparation/prepare.py +346 -0
- helia_ethos-0.2.0/src/helia_ethos/preparation/types.py +248 -0
- helia_ethos-0.2.0/src/helia_ethos/py.typed +0 -0
- helia_ethos-0.2.0/src/helia_ethos/soc.py +652 -0
- helia_ethos-0.2.0/src/helia_ethos/soc_schema.py +555 -0
- helia_ethos-0.2.0/src/helia_ethos/socs/atomiq110.yaml +5 -0
- helia_ethos-0.2.0/src/helia_ethos/target.py +251 -0
- helia_ethos-0.2.0/src/helia_ethos/targets/atomiq110-fpga-turbo-npu.yaml +34 -0
- helia_ethos-0.2.0/src/helia_ethos/targets/atomiq110-fvp-corstone-320.yaml +31 -0
- helia_ethos-0.2.0/src/helia_ethos/targets/atomiq110-rtl.yaml +24 -0
- helia_ethos-0.2.0/src/helia_ethos/targets/atomiq110-silicon.yaml +18 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/__init__.py +51 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/compile.py +87 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/invoke.py +154 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/per_layer.py +284 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/static_shapes.py +78 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/summary.py +181 -0
- helia_ethos-0.2.0/src/helia_ethos/vela/system_config.py +199 -0
- helia_ethos-0.2.0/src/helia_ethos/yaml_loading.py +59 -0
- helia_ethos-0.2.0/tests/conftest.py +194 -0
- helia_ethos-0.2.0/tests/test_catalog.py +72 -0
- helia_ethos-0.2.0/tests/test_catalog_policy.py +153 -0
- helia_ethos-0.2.0/tests/test_fencing.py +731 -0
- helia_ethos-0.2.0/tests/test_fvp.py +110 -0
- helia_ethos-0.2.0/tests/test_model.py +112 -0
- helia_ethos-0.2.0/tests/test_pmu.py +249 -0
- helia_ethos-0.2.0/tests/test_port_mapping_doc.py +148 -0
- helia_ethos-0.2.0/tests/test_preparation.py +374 -0
- helia_ethos-0.2.0/tests/test_soc.py +400 -0
- helia_ethos-0.2.0/tests/test_standalone_core.py +94 -0
- helia_ethos-0.2.0/tests/test_static_shapes.py +72 -0
- helia_ethos-0.2.0/tests/test_target.py +88 -0
- helia_ethos-0.2.0/tests/test_vela_compile.py +42 -0
- helia_ethos-0.2.0/tests/test_vela_invoke.py +161 -0
- helia_ethos-0.2.0/tests/test_vela_per_layer.py +128 -0
- helia_ethos-0.2.0/tests/test_vela_summary.py +112 -0
- helia_ethos-0.2.0/tests/test_vela_system_config.py +204 -0
- helia_ethos-0.2.0/uv.lock +603 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to helia-npu. The package follows semantic versioning once
|
|
4
|
+
it reaches 1.0; until then a minor bump may change an API.
|
|
5
|
+
|
|
6
|
+
## [0.2.0](https://github.com/AmbiqAI/helia-ethos/compare/v0.1.0...v0.2.0) (2026-11-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add shared model preparation and retained artifact inspection ([#5](https://github.com/AmbiqAI/helia-ethos/issues/5)) ([fc27143](https://github.com/AmbiqAI/helia-ethos/commit/fc27143d2e0cbdb24d41b8a606be2fe9d06f9a63))
|
|
12
|
+
* extract standalone helia-ethos package ([#1](https://github.com/AmbiqAI/helia-ethos/issues/1)) ([39b17d3](https://github.com/AmbiqAI/helia-ethos/commit/39b17d3302d3815e3be27d9ae15649f465ec631d))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* correct model inspection and reject invalid timing clocks ([#3](https://github.com/AmbiqAI/helia-ethos/issues/3)) ([bdae235](https://github.com/AmbiqAI/helia-ethos/commit/bdae23593b072400761d8c342c4d9179f83b4ee5))
|
|
18
|
+
|
|
19
|
+
## 0.1.0 (unreleased, developed inside helia-estimator)
|
|
20
|
+
|
|
21
|
+
- `MemoryTimingOverride.deliberate` (default true): an override a tool derives sets it false, so it reaches
|
|
22
|
+
Vela without lifting the port-1 latency clamp that a deliberate port-1 sweep lifts.
|
|
23
|
+
- SoC definitions with per-value provenance (confirmed, fitted, unverified),
|
|
24
|
+
operating modes, memories with AXI port bindings, timing derivation in NPU
|
|
25
|
+
cycles, and standard and custom memory placements (`helia_npu.soc`,
|
|
26
|
+
`soc_schema`); the golden `atomiq110` ships with the package.
|
|
27
|
+
- Targets: which realization of a SoC a measurement is attributed to and
|
|
28
|
+
whether its timing stands for the part (`helia_npu.target`).
|
|
29
|
+
- Vela: the system config for a SoC and operating point, `compile_for_target`,
|
|
30
|
+
the typed summary and the per-layer table (`helia_npu.vela`).
|
|
31
|
+
- The Corstone FVP target matrix and the PMU programs behind each profile
|
|
32
|
+
(`helia_npu.fvp`, `helia_npu.pmu`). `FVP_TARGET_PROFILES` is a tuple of
|
|
33
|
+
FVP models (the Corstone-300's U55 and U65, the Corstone-320's U85), and
|
|
34
|
+
`resolve_fvp_target_profile(subsystem, npu)` picks one by NPU; it refuses a
|
|
35
|
+
subsystem that does not simulate the NPU, which `validate_fvp_target_for_npu`
|
|
36
|
+
used to check. A simulator target may name its `fvp_subsystem`.
|
|
37
|
+
- `NpuFamily` lives in `helia_npu.soc` (still importable from `helia_npu.fvp`)
|
|
38
|
+
and gives each NPU's AXI beat width; a SoC's `axi_bus_width_bits` defaults to
|
|
39
|
+
it and must equal it.
|
|
40
|
+
- Model inspection and STREAM_SPLIT fencing with a boundaries sidecar
|
|
41
|
+
(`helia_npu.model`, `helia_npu.fencing`), behind the `models` extra.
|
|
42
|
+
- `VelaMemoryMode`, `TimingAdapterPort`, `FenceBoundaries`, `FenceSidecarError`.
|
|
43
|
+
- Packaging: the core depends on pydantic and PyYAML only; the `models` extra
|
|
44
|
+
adds LiteRT, the `vela` extra the compiler; every public name is importable
|
|
45
|
+
from `helia_npu` or `helia_npu.vela`, the ones behind `models` on first use;
|
|
46
|
+
`py.typed` ships.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Ambiq Micro, Inc. Evaluation Source License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ambiq Micro, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and its documentation (the "Software") are made available by
|
|
6
|
+
Ambiq Micro, Inc. ("Ambiq") for evaluation purposes only, under the terms
|
|
7
|
+
below. If you do not agree to these terms, do not use the Software.
|
|
8
|
+
|
|
9
|
+
1. Grant. Subject to these terms, Ambiq grants you a non-exclusive,
|
|
10
|
+
non-transferable, revocable, royalty-free licence to use, reproduce and
|
|
11
|
+
modify the Software internally, solely to evaluate Ambiq products and to
|
|
12
|
+
develop and test software intended to run on Ambiq products.
|
|
13
|
+
|
|
14
|
+
2. Restrictions. You may not (a) distribute, publish, sublicense, sell, rent
|
|
15
|
+
or otherwise make the Software or any modification of it available to any
|
|
16
|
+
third party, in source or object form; (b) use the Software to develop or
|
|
17
|
+
evaluate products that do not incorporate an Ambiq device; (c) remove or
|
|
18
|
+
alter any copyright, licence or attribution notice; or (d) use Ambiq's
|
|
19
|
+
name or trademarks except to identify the Software.
|
|
20
|
+
|
|
21
|
+
3. Confidentiality. The Software may contain non-public information about
|
|
22
|
+
Ambiq products. Treat it as Ambiq confidential information under any
|
|
23
|
+
non-disclosure agreement in force between you and Ambiq; absent such an
|
|
24
|
+
agreement, do not disclose it outside your organisation.
|
|
25
|
+
|
|
26
|
+
4. Third-party components. Portions of the Software depend on or include
|
|
27
|
+
third-party software distributed under their own licences (including
|
|
28
|
+
Arm's Ethos-U Vela compiler, Arm Fixed Virtual Platforms and models from
|
|
29
|
+
Google's LiteRT). Those licences govern those components. Arm's Fixed
|
|
30
|
+
Virtual Platform end-user licence applies to any FVP the Software
|
|
31
|
+
downloads on your behalf.
|
|
32
|
+
|
|
33
|
+
5. Estimates. Numbers the Software produces are estimates from models and
|
|
34
|
+
simulators, not measurements of a device, and are provided for guidance
|
|
35
|
+
only. Ambiq makes no commitment that any product will meet them.
|
|
36
|
+
|
|
37
|
+
6. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
38
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF
|
|
39
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
40
|
+
|
|
41
|
+
7. Limitation of liability. IN NO EVENT SHALL AMBIQ BE LIABLE FOR ANY CLAIM,
|
|
42
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
43
|
+
ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
|
|
44
|
+
|
|
45
|
+
8. Term. This licence continues until terminated. Ambiq may terminate it on
|
|
46
|
+
notice; it terminates automatically if you breach it. On termination,
|
|
47
|
+
stop using the Software and destroy your copies.
|
|
48
|
+
|
|
49
|
+
9. Feedback. Suggestions or improvements you give Ambiq about the Software
|
|
50
|
+
may be used by Ambiq without obligation to you.
|
|
51
|
+
|
|
52
|
+
Questions: support.aitg@ambiq.com
|
helia_ethos-0.2.0/NOTICE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
helia-ethos
|
|
2
|
+
Copyright (c) 2026 Ambiq Micro, Inc. All rights reserved.
|
|
3
|
+
|
|
4
|
+
Ambiq's code is provided under the Evaluation Source License in LICENSE.
|
|
5
|
+
Third-party components retain their own licences and copyright notices.
|
|
6
|
+
|
|
7
|
+
The core package depends on Pydantic and PyYAML (MIT). The models extra uses
|
|
8
|
+
Google's LiteRT (Apache-2.0); the vela extra uses Arm's Ethos-U Vela compiler
|
|
9
|
+
(Apache-2.0). Their transitive dependencies and notices retain their own terms.
|
|
10
|
+
|
|
11
|
+
helia-platforms supplies hardware catalog facts under its own licence.
|
|
12
|
+
This distribution does not bundle Arm FVP binaries, firmware runtimes, model
|
|
13
|
+
weights or HELX energy profiles. Consumers distribute their own runtime notices.
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: helia-ethos
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Ethos-U NPU support for the helia toolchain: SoC definitions with provenance, Vela compilation for a SoC and operating point, PMU programs, model inspection and graph fencing.
|
|
5
|
+
Project-URL: Repository, https://github.com/AmbiqAI/helia-ethos
|
|
6
|
+
Project-URL: Documentation, https://github.com/AmbiqAI/helia-ethos
|
|
7
|
+
Project-URL: Changelog, https://github.com/AmbiqAI/helia-ethos/blob/main/CHANGELOG.md
|
|
8
|
+
Author-email: Ambiq AITG <support.aitg@ambiq.com>
|
|
9
|
+
License: Ambiq Micro, Inc. Evaluation Source License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 Ambiq Micro, Inc. All rights reserved.
|
|
12
|
+
|
|
13
|
+
This software and its documentation (the "Software") are made available by
|
|
14
|
+
Ambiq Micro, Inc. ("Ambiq") for evaluation purposes only, under the terms
|
|
15
|
+
below. If you do not agree to these terms, do not use the Software.
|
|
16
|
+
|
|
17
|
+
1. Grant. Subject to these terms, Ambiq grants you a non-exclusive,
|
|
18
|
+
non-transferable, revocable, royalty-free licence to use, reproduce and
|
|
19
|
+
modify the Software internally, solely to evaluate Ambiq products and to
|
|
20
|
+
develop and test software intended to run on Ambiq products.
|
|
21
|
+
|
|
22
|
+
2. Restrictions. You may not (a) distribute, publish, sublicense, sell, rent
|
|
23
|
+
or otherwise make the Software or any modification of it available to any
|
|
24
|
+
third party, in source or object form; (b) use the Software to develop or
|
|
25
|
+
evaluate products that do not incorporate an Ambiq device; (c) remove or
|
|
26
|
+
alter any copyright, licence or attribution notice; or (d) use Ambiq's
|
|
27
|
+
name or trademarks except to identify the Software.
|
|
28
|
+
|
|
29
|
+
3. Confidentiality. The Software may contain non-public information about
|
|
30
|
+
Ambiq products. Treat it as Ambiq confidential information under any
|
|
31
|
+
non-disclosure agreement in force between you and Ambiq; absent such an
|
|
32
|
+
agreement, do not disclose it outside your organisation.
|
|
33
|
+
|
|
34
|
+
4. Third-party components. Portions of the Software depend on or include
|
|
35
|
+
third-party software distributed under their own licences (including
|
|
36
|
+
Arm's Ethos-U Vela compiler, Arm Fixed Virtual Platforms and models from
|
|
37
|
+
Google's LiteRT). Those licences govern those components. Arm's Fixed
|
|
38
|
+
Virtual Platform end-user licence applies to any FVP the Software
|
|
39
|
+
downloads on your behalf.
|
|
40
|
+
|
|
41
|
+
5. Estimates. Numbers the Software produces are estimates from models and
|
|
42
|
+
simulators, not measurements of a device, and are provided for guidance
|
|
43
|
+
only. Ambiq makes no commitment that any product will meet them.
|
|
44
|
+
|
|
45
|
+
6. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
46
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF
|
|
47
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
48
|
+
|
|
49
|
+
7. Limitation of liability. IN NO EVENT SHALL AMBIQ BE LIABLE FOR ANY CLAIM,
|
|
50
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
51
|
+
ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
|
|
52
|
+
|
|
53
|
+
8. Term. This licence continues until terminated. Ambiq may terminate it on
|
|
54
|
+
notice; it terminates automatically if you breach it. On termination,
|
|
55
|
+
stop using the Software and destroy your copies.
|
|
56
|
+
|
|
57
|
+
9. Feedback. Suggestions or improvements you give Ambiq about the Software
|
|
58
|
+
may be used by Ambiq without obligation to you.
|
|
59
|
+
|
|
60
|
+
Questions: support.aitg@ambiq.com
|
|
61
|
+
License-File: LICENSE
|
|
62
|
+
License-File: NOTICE
|
|
63
|
+
Keywords: ambiq,ethos-u,npu,tinyml,vela
|
|
64
|
+
Classifier: Development Status :: 3 - Alpha
|
|
65
|
+
Classifier: Intended Audience :: Developers
|
|
66
|
+
Classifier: License :: Other/Proprietary License
|
|
67
|
+
Classifier: Programming Language :: Python :: 3
|
|
68
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
69
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
70
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
71
|
+
Classifier: Topic :: Scientific/Engineering
|
|
72
|
+
Classifier: Typing :: Typed
|
|
73
|
+
Requires-Python: >=3.11
|
|
74
|
+
Requires-Dist: helia-platforms<0.3,>=0.2
|
|
75
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
76
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
77
|
+
Provides-Extra: all
|
|
78
|
+
Requires-Dist: ai-edge-litert<2.3,>=2.1.6; extra == 'all'
|
|
79
|
+
Requires-Dist: backports-strenum<1.3; extra == 'all'
|
|
80
|
+
Requires-Dist: ethos-u-vela>=5.2.0; extra == 'all'
|
|
81
|
+
Provides-Extra: models
|
|
82
|
+
Requires-Dist: ai-edge-litert<2.3,>=2.1.6; extra == 'models'
|
|
83
|
+
Requires-Dist: backports-strenum<1.3; extra == 'models'
|
|
84
|
+
Provides-Extra: vela
|
|
85
|
+
Requires-Dist: ethos-u-vela>=5.2.0; extra == 'vela'
|
|
86
|
+
Description-Content-Type: text/markdown
|
|
87
|
+
|
|
88
|
+
# helia-ethos
|
|
89
|
+
|
|
90
|
+
Ethos-U NPU support for the helia toolchain: what a SoC looks like to the NPU,
|
|
91
|
+
how to compile a model for it with Vela, which Corstone FVP can run the
|
|
92
|
+
result, and how to read the PMU. One package so that every tool in the chain
|
|
93
|
+
(helia-estimator, heliaAOT, heliaRT, heliaPROFILER) computes against the same
|
|
94
|
+
silicon facts and spells them the same way.
|
|
95
|
+
|
|
96
|
+
This standalone package was extracted from heliaEstimator. Hardware catalog facts
|
|
97
|
+
come from helia-platforms; this package owns Ethos-specific compilation and timing
|
|
98
|
+
policy. Experiment execution, runtime integration and result bundles remain with
|
|
99
|
+
its consumers.
|
|
100
|
+
|
|
101
|
+
The proposed [extraction and preparation contract](docs/extraction_contract.md)
|
|
102
|
+
defines ownership, the planned consumer API and the implementation sequence.
|
|
103
|
+
The shared API is described in [model preparation and inspection](docs/preparation.md).
|
|
104
|
+
Use it for retained compilation evidence and optional fences; the low-level APIs
|
|
105
|
+
below remain available.
|
|
106
|
+
|
|
107
|
+
## Install
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install helia-ethos # the core: SoC and target definitions, timing, system config, PMU programs
|
|
111
|
+
pip install 'helia-ethos[vela]' # plus the Vela compiler, for compile_for_target
|
|
112
|
+
pip install 'helia-ethos[models]' # plus LiteRT, for reading and fencing .tflite files
|
|
113
|
+
pip install 'helia-ethos[all]'
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The core uses pydantic, PyYAML and helia-platforms. A function behind an extra says so
|
|
117
|
+
when the extra is missing (`pip install 'helia-ethos[models]'`). Python 3.11–3.13 are tested; optional extras also depend on upstream wheel
|
|
118
|
+
availability. The package ships `py.typed`.
|
|
119
|
+
|
|
120
|
+
## What is in it
|
|
121
|
+
|
|
122
|
+
| Module | Owns |
|
|
123
|
+
|---|---|
|
|
124
|
+
| `helia_ethos.soc`, `soc_schema` | The SoC as the NPU sees it: identity (`id`, `origin`, `revision`), NPU instance, memories with AXI bindings, operating modes, per-value provenance (confirmed, fitted, unverified); `load_soc`, `derive_timing`, placements, `VelaMemoryMode`, `TimingAdapterPort`. The catalog-backed `atomiq110` reference ships with the package |
|
|
125
|
+
| `helia_ethos.target` | Realizations of a SoC (silicon, FPGA drop, RTL, simulator): what each implements, its clocks, whether its timing stands for the part |
|
|
126
|
+
| `helia_ethos.vela` | The Vela `.ini` for a SoC and operating point, `compile_for_target`, the typed summary (`VelaSummary`, `VelaColumn`) and the per-layer table |
|
|
127
|
+
| `helia_ethos.fvp` | The Corstone FVP target matrix: which subsystem executes which engine and memory mode, base addresses, timing-adapter layout, required PMU fields |
|
|
128
|
+
| `helia_ethos.pmu` | The PMU program behind each profile name: events per counter slot, units, derived fields; `render_c_header` for the firmware, the host's required fields from the same object |
|
|
129
|
+
| `helia_ethos.npu_reference` | Arm's reference energy per cycle per NPU configuration, with provenance |
|
|
130
|
+
| `helia_ethos.model` (`models` extra) | What a `.tflite` contains: parameters, constant bytes, operators, I/O, the embedded command-stream size |
|
|
131
|
+
| `helia_ethos.fencing` (`models` extra) | `ETHOS_U_STREAM_SPLIT` injection to break a command stream at chosen operators, `plan_fences` from Vela's own estimate, and the boundaries sidecar (`FenceBoundaries`) |
|
|
132
|
+
|
|
133
|
+
Everything a consumer needs is importable from `helia_ethos`; the names behind
|
|
134
|
+
the `models` extra are imported on first use.
|
|
135
|
+
|
|
136
|
+
The two memory ports and every name they carry (SoC `axi_port`, Vela
|
|
137
|
+
`Sram`/`Dram`, PMU `AXI0`/`SRAM`, FVP TA0/TA1, the physical memories) are in
|
|
138
|
+
[docs/port_mapping.md](https://github.com/AmbiqAI/helia-ethos/blob/main/docs/port_mapping.md), which a test keeps in step with
|
|
139
|
+
the code. Changes are in [CHANGELOG.md](https://github.com/AmbiqAI/helia-ethos/blob/main/CHANGELOG.md).
|
|
140
|
+
|
|
141
|
+
## Using it
|
|
142
|
+
|
|
143
|
+
Everything below runs with the package alone, no helia-estimator, no config
|
|
144
|
+
files. The `vela` extra is needed where a compile happens.
|
|
145
|
+
|
|
146
|
+
### Compile for a SoC and operating point (heliaAOT, heliaPROFILER)
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
from pathlib import Path
|
|
150
|
+
from helia_ethos import load_soc
|
|
151
|
+
from helia_ethos.vela import compile_for_target
|
|
152
|
+
|
|
153
|
+
soc = load_soc("atomiq110") # catalog-backed; or load_soc(Path("my_soc.yaml"))
|
|
154
|
+
compiled = compile_for_target(
|
|
155
|
+
Path("kws.tflite"),
|
|
156
|
+
soc,
|
|
157
|
+
"ULP", # or "HP": the NPU clock, not the CPU's
|
|
158
|
+
memory_mode="Shared_Sram", # weights on port 1 (HBLRAM), arena + cache on port 0 (SSRAM)
|
|
159
|
+
arena_cache_size=1 << 20, # bytes of SSRAM Vela may use for the arena and weight cache
|
|
160
|
+
output_dir=Path("out"),
|
|
161
|
+
)
|
|
162
|
+
compiled.tflite # the model with its Ethos-U command stream
|
|
163
|
+
compiled.summary # VelaSummary: nn_macs, cycles_total, ...
|
|
164
|
+
compiled.per_layer # list[LayerRow] from --verbose-performance
|
|
165
|
+
compiled.config_file # the generated .ini, for reproducibility
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`memory_mode` can also name a custom placement passed in `extra_placements`;
|
|
169
|
+
`timing_overrides` changes latency, bandwidth or outstanding transactions for
|
|
170
|
+
one compile.
|
|
171
|
+
|
|
172
|
+
### Ask where to cut a graph, then cut it (heliaAOT chunking, heliaPROFILER per-segment)
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
from helia_ethos.fencing import fence_model, plan_fences
|
|
176
|
+
from helia_ethos.vela import read_tflite_graph
|
|
177
|
+
|
|
178
|
+
ops = read_tflite_graph(Path("kws.tflite"))
|
|
179
|
+
plan = plan_fences(compiled.per_layer, ops, cycle_budget=50_000, max_op_cycles=200_000, model=Path("kws.tflite"))
|
|
180
|
+
plan.coverage.summary() # what could and could not be attributed, and why
|
|
181
|
+
fenced = fence_model(Path("kws.tflite"), plan, Path("out/fenced"))
|
|
182
|
+
# fenced.fenced_model_path: ETHOS_U_STREAM_SPLIT after each fence; compile it the same way.
|
|
183
|
+
# fenced.source_sha256 and fenced.fence_tensor_names are the join keys; the sidecar carries them per segment.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Cycle-based policies plan on Vela's estimate, attributed to original operators
|
|
187
|
+
by name; rows the planner cannot place are reported in `plan.coverage`, and a
|
|
188
|
+
budget plan raises below full coverage unless `min_coverage=` accepts the
|
|
189
|
+
gap. A plan bounds latency on nothing; measure it. `ETHOS_U_STREAM_SPLIT` runtime
|
|
190
|
+
support is the consumer's: the fenced model needs an identity (memcpy)
|
|
191
|
+
custom-op kernel registered in the runtime.
|
|
192
|
+
|
|
193
|
+
### Say which realization a number came from
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
from helia_ethos import load_target
|
|
197
|
+
|
|
198
|
+
target = load_target("atomiq110-fvp-corstone-320")
|
|
199
|
+
target.timing_is_representative # False: the FVP's timing does not stand for the part
|
|
200
|
+
target.label() # what a result records next to the SoC id and revision
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Program the PMU the same way as everyone else (heliaPROFILER)
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
from helia_ethos import NpuFamily, program_for, render_c_header
|
|
207
|
+
|
|
208
|
+
program = program_for(NpuFamily.ETHOS_U85, "port_stall")
|
|
209
|
+
render_c_header(program) # the table the firmware compiles
|
|
210
|
+
program.required_fields # what the host must find in the report
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Read the SoC (heliaRT, neuralSPOT-X, anything that wants the memory system)
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from helia_ethos import derive_timing, load_soc
|
|
217
|
+
|
|
218
|
+
soc = load_soc("atomiq110")
|
|
219
|
+
soc.memories["hblram"].axi_port # 1
|
|
220
|
+
soc.provenance_label("memories.hblram") # the block's status
|
|
221
|
+
soc.provenance["memories.hblram"].for_field("read_latency_ns").status # one value's status
|
|
222
|
+
derive_timing(soc, "HP").memories["ssram"].read_latency # NPU cycles at the HP clock
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Naming
|
|
226
|
+
|
|
227
|
+
The two memory ports and every name they carry (SoC `axi_port`, Vela `Sram`/`Dram`, PMU `AXI0`/`SRAM`, FVP TA0/TA1, the physical memories) are joined in [docs/port_mapping.md](https://github.com/AmbiqAI/helia-ethos/blob/main/docs/port_mapping.md), which a test keeps in step with the code.
|
|
228
|
+
|
|
229
|
+
Aligned with heliaPROFILER and heliaAOT, which both already use `atomiq110`:
|
|
230
|
+
|
|
231
|
+
| Concept | Spelling | Why |
|
|
232
|
+
|---|---|---|
|
|
233
|
+
| Canonical SoC id | `atomiq110` | Generates identifiers; must be stable |
|
|
234
|
+
| Official name | `Atomiq110` | Human-facing text only |
|
|
235
|
+
| Engineering name | `AT110` | A valid alias, matched case-insensitively |
|
|
236
|
+
|
|
237
|
+
The canonical id, never the official name, is what should generate Vela
|
|
238
|
+
system-config sections, filenames and config keys, because product names
|
|
239
|
+
change for product reasons and identifiers must not. Since 2026-09-20 the section
|
|
240
|
+
is `atomiq110_ULP` (id + mode); bundles written earlier carry `AT110_ULP`,
|
|
241
|
+
and nothing re-derives a name from a bundle, so both read.
|
|
242
|
+
|
|
243
|
+
The constraints the SoC model is built to are in [docs/soc_design_notes.md](https://github.com/AmbiqAI/helia-ethos/blob/main/docs/soc_design_notes.md).
|
|
244
|
+
|
|
245
|
+
## helia-platforms integration
|
|
246
|
+
|
|
247
|
+
The adapter supports the released helia-platforms 0.2 series from PyPI.
|
|
248
|
+
The development lock selects 0.2.0; installed wheels declare `>=0.2,<0.3`.
|
|
249
|
+
Refresh deliberately with `uv lock --upgrade-package helia-platforms` and
|
|
250
|
+
validate the catalog integration before shipping the updated lock.
|
|
251
|
+
|
|
252
|
+
`helia_ethos.catalog.read_catalog_npu` accepts an explicit `Catalog`, target name
|
|
253
|
+
and optional NPU instance id. It returns frozen facts with the full
|
|
254
|
+
`Catalog.identity()`, including source-overlay digests. It retains native
|
|
255
|
+
provenance and unresolved reach. Multiple NPUs require explicit selection.
|
|
256
|
+
|
|
257
|
+
`helia_ethos.catalog_policy.project_catalog_soc` joins those facts to an explicit
|
|
258
|
+
`SocModelPolicy`. The result carries the executable `SocDefinition`, original
|
|
259
|
+
catalog facts and policy identity together:
|
|
260
|
+
|
|
261
|
+
```python
|
|
262
|
+
from helia_platforms import builtin
|
|
263
|
+
from helia_ethos.catalog import read_catalog_npu
|
|
264
|
+
from helia_ethos.catalog_policy import at110_model_policy, project_catalog_soc
|
|
265
|
+
from helia_ethos.vela import write_system_config
|
|
266
|
+
from pathlib import Path
|
|
267
|
+
|
|
268
|
+
facts = read_catalog_npu("atomiq110", catalog=builtin())
|
|
269
|
+
projection = project_catalog_soc(facts, policy=at110_model_policy())
|
|
270
|
+
write_system_config(projection.soc, "HP", Path("at110-catalog.ini"))
|
|
271
|
+
print(projection.facts.identity.to_dict())
|
|
272
|
+
print(projection.policy_id)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Facts and policy boundary
|
|
276
|
+
|
|
277
|
+
| Input | Owner in this slice |
|
|
278
|
+
|---|---|
|
|
279
|
+
| NPU family, MAC count, bus width, clock points, SRAM hash | Catalog; policy checks accelerator compatibility |
|
|
280
|
+
| Memory identities, capacities, base addresses, reach and native provenance | Catalog; full facts retained beside the projection |
|
|
281
|
+
| Compiler port class and default occupant | Explicit helia-ethos policy, independent of catalog order and access-port fields |
|
|
282
|
+
| Read/write latencies, fabric-rate assumption, effective queues, burst selection, Vela ports-used | Existing helia-ethos YAML, consumed as model inputs until citable hardware facts are settled in platforms #93 |
|
|
283
|
+
| Hardware transaction ceilings | Retained as catalog facts, never substituted for effective model queues |
|
|
284
|
+
| Energy coefficients | HELX; this adapter does not read or move them |
|
|
285
|
+
|
|
286
|
+
The AT110 policy reads `model_policies/atomiq110.yaml`; hardware facts
|
|
287
|
+
come from the catalog. `at110_model_policy()` excludes comparison-only PSRAM
|
|
288
|
+
unless explicitly selected. The shipped `load_soc("atomiq110")` reference
|
|
289
|
+
selects it to preserve existing placement experiments, with unverified reach.
|
|
290
|
+
The bare-SoC catalog has XSPI apertures but no populated PSRAM device.
|
|
291
|
+
|
|
292
|
+
AT110 checks cover ULP/HP, SRAM-only, shared and dedicated HBLRAM/RRAM placements:
|
|
293
|
+
generated Vela section values and FVP timing-adapter profiles must match. Expected
|
|
294
|
+
non-numerical differences are the derived origin, catalog provenance, retained
|
|
295
|
+
catalog identity and omission of the PSRAM alternative in comments. Physical
|
|
296
|
+
catalog capacity is not silently used as a Corstone linker capacity. The FPGA
|
|
297
|
+
implementation is refused by this silicon policy rather than inheriting silicon
|
|
298
|
+
timings. Missing bus width/hash or modeled-memory reach is actionable.
|
|
299
|
+
|
|
300
|
+
### Default AT110 loading
|
|
301
|
+
|
|
302
|
+
The standard reference now uses catalog hardware facts and the packaged
|
|
303
|
+
`model_policies/atomiq110.yaml` for timing and placement. PSRAM is an explicit
|
|
304
|
+
unverified comparison assumption; it does not imply a populated catalog device.
|
|
305
|
+
FPGA implementation policies and package extraction remain separate work.
|
|
306
|
+
|
|
307
|
+
The pinned catalog still has the older access-port layout from before the #93
|
|
308
|
+
split; the adapter does not interpret that field as placement policy. No
|
|
309
|
+
helia-platforms repository changes are required for the current SoC projection.
|
|
310
|
+
|
|
311
|
+
HELX exposes both the standard reference and explicit catalog selection through its shared platform loader. See
|
|
312
|
+
[the catalog integration guide](https://github.com/AmbiqAI/helia-estimator/blob/main/docs/platform_catalog.md) for configuration,
|
|
313
|
+
identity, energy-profile compatibility and replay behavior.
|
|
314
|
+
|
|
315
|
+
## Development and releases
|
|
316
|
+
|
|
317
|
+
Run `uv sync --frozen`, then `uv run --frozen python scripts/gates.py`.
|
|
318
|
+
The gates check the lock, lint, types and package tests, including real Vela
|
|
319
|
+
compilation of generated models. No model download or FVP setup is required.
|
|
320
|
+
Run `uv run --frozen python scripts/check_distribution.py` to build distributions
|
|
321
|
+
and verify core-only and full-extra wheel installations outside the checkout.
|
|
322
|
+
|
|
323
|
+
CI covers Python 3.11–3.13 on Linux, plus Python 3.12 on macOS and Windows.
|
|
324
|
+
Release Please owns version and changelog changes. Release publication requires
|
|
325
|
+
the PyPI trusted publisher and protected `pypi` environment to be configured.
|
|
326
|
+
See [release setup](docs/releasing.md).
|
|
327
|
+
|
|
328
|
+
The inherited 0.1.0 changelog describes the pre-extraction `helia-npu` package;
|
|
329
|
+
its old import names are historical. Use `helia_ethos` and the installation
|
|
330
|
+
examples above. PMU program identifiers retain their `helia-npu/` prefix so
|
|
331
|
+
existing and new captures identify the same counter program.
|
|
332
|
+
|
|
333
|
+
The source is publicly available under the Ambiq Evaluation Source License;
|
|
334
|
+
see [LICENSE](LICENSE) for permitted use and redistribution restrictions.
|