GAIA-ML
GAIA-ML is an experimental compiler that turns ONNX models into optimized C++ kernels and graphs for AMD AI Engine v1, targeting the Versal Premium VP2802-2M. It supports Dense/MLP networks, supported CNN patterns, and bounded tree ensembles. Neural-network kernels support float32, int32, int16 and int8.
GAIA selects implementations, fuses supported operations, packs weights and partitions work across AIE tiles. It generates an ADF graph, kernels, test vectors, build files and reports describing resource use and estimated latency. Generating a project does not require Vitis. Building and simulating the emitted AIE code requires the AMD toolchain separately.
Install
From a checkout, with Python 3.9 or newer:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
gaia_ml version
Compile a model
Inspect the model and target constraints, then generate a project:
gaia_ml inspect model.onnx --stage constraints
gaia_ml compile model.onnx \
--output gaia_project \
--schedule-objective latency \
--data-file input.csv \
--simulation-events 10
Each CSV row is one flattened input event; provide at least as many rows as
--simulation-events. For dynamic inputs, supply a static --input-shape,
for example --input-shape 1,3,18,18. Use a new output directory or --force
to regenerate an existing project.
Useful compilation options:
| Option | Purpose |
|---|---|
--aggressive-latency-search |
Explore more supported implementation and tile choices. |
--latency-metric first-output |
Prioritize the first completed inference. |
--latency-metric interval |
Prioritize spacing between successive outputs. |
--latency-metric balanced |
Balance first-output latency and output interval. |
--latency-metric burst --burst-events 100 |
Prioritize completion of a 100-event burst. |
--quantize int8 |
Generate integer kernels; also accepts int16 and int32. |
--max-tiles 16 |
Limit the available compute tiles. |
The generated graph/, kernels/ and weights/ contain the AIE implementation.
manifest.json records the selected schedule, constraints and latency estimates;
execution_plan.json records resolved execution choices.
Build and validate
After loading your AMD Vitis environment:
cd gaia_project
make aie
make aiesim
cd ..
gaia_ml verify gaia_project
GAIA is not a general-purpose ONNX backend: operator, shape and resource limits apply. Integer conversion can change model accuracy. Latency estimates are planning predictions, not hardware guarantees; validate numerical outputs and measured timing for your model.
Documentation and development
- Run
gaia_ml compile --helpfor all compilation options. - See the compiler stages for IRs and optimization details.
- See release notes for version history.
- Run tests with
python -m unittest discover -s tests.
Developed by the NGT WP2.1 Group. Core developer: Ioannis Xiotidis. Distributed under the MIT license.
Metadata
Release files for gaia-ml 0.12.91
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gaia_ml-0.12.91.tar.gz | 455.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gaia_ml-0.12.91-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 917.9 kB
Release files / gaia_ml-0.12.91.tar.gz
| Download URL | gaia_ml-0.12.91.tar.gz |
|---|---|
| Size | 455.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49da81aa16e30b2846a885d9ca18a6a036206757e98a8ae0d5b8c180ddbc2290
|
|
BLAKE2b-256 checksum How to use checksums |
a306f202d1799275c7ce6374a897a8675e3e4ba9c0fccecb291263dd500dbad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / gaia_ml-0.12.91-py3-none-any.whl
| Download URL | gaia_ml-0.12.91-py3-none-any.whl |
|---|---|
| Size | 462.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5325e7893501db13e79eaf8d7b5b93151e3d201c117a2faefa1cd1fa0da5c4e1
|
|
BLAKE2b-256 checksum How to use checksums |
5809476992a17119dd9ca2b4a5600d7fac6ad2758c35567fc30ea4460d65db90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|