Aidge CPP Export
This module depends on aidge_core and registers generic C++ implementations for DNN operators.
Examples
If you want to generate exports and/or better understand how it works in Aidge, you may take a look at the following resources :
- Example Scripts : Python scripts examples to export common models;
- Export Tutorials : Notebooks to better understand the export process (you may find these tutorials on the Aidge documentation page as well);
- User Guide : Theoretical guides detailing the export structure.
Quick start
System Requirements
python >= 3.10
pip install aidge-export-cpp
Static analysis of generated C/C++ code
Host C++ exports provide opt-in strict compilation and blocking analysis with
Cppcheck and
Clang-Tidy. These tools are system
dependencies: installing Aidge does not install them. Install the profiles you
intend to use and ensure the executables are available in PATH.
For example, on Debian or Ubuntu:
sudo apt install cppcheck clang-tidy
Select a profile through the Python export configuration:
from aidge_core.export_utils import export
from aidge_core.export_utils.config import ExportConfig
export(
graph=model,
config=ExportConfig(
target="host",
export_folder="export_model_float32_host",
static_analysis="static-analysis",
),
input_tensors=[input_tensor],
)
static_analysis is disabled by default. It accepts the following values:
| Profile | Behavior |
|---|---|
strict |
Compile a separate binary with additional warnings promoted to errors. |
cppcheck |
Run Cppcheck checks focused on likely defects. |
cppcheck-strict |
Run broader Cppcheck style, performance and portability checks. |
clang-tidy |
Run the Clang static analyzer checks. |
clang-tidy-strict |
Add bug-prone, performance and portability checks. |
static-analysis |
Run the standard Cppcheck and Clang-Tidy profiles. |
static-analysis-strict |
Run both strict analyzer profiles. |
Passing True is a convenience equivalent to running static-analysis and
strict. Passing False or None disables the feature.
The same profiles are available as standalone targets in a generated host export:
cmake -S . -B build
cmake --build build --target strict
cmake --build build --target cppcheck
cmake --build build --target cppcheck-strict
cmake --build build --target clang-tidy
cmake --build build --target clang-tidy-strict
cmake --build build --target static-analysis
cmake --build build --target static-analysis-strict
The regular executable remains at build/run_export. The strict target writes
its separate executable to build/strict/run_export. Analysis requested via
the Python API is currently supported only by CMake-based exports; requesting
it for a Make-based bare-metal target raises an explicit error.
🛠 Build from Source
Prerequisite (in addition to previous one):
- Please review the global installation instructions before proceeding.
- If using a virtual environment, use the same one for all Aidge modules.
1. Python installation using setup scripts
| Environment | Python Development |
|---|---|
| Windows | .\setup.ps1 -Modules export_cpp -Tests |
| Unix | ./setup.sh -m export_cpp --tests |
2. Python Installation using pip
Run these commands from the aidge_export_cpp/ directory:
#fStandard install
pip install . -v
# Install with testing dependencies
pip install .[test] -v && pytest
Editable Install (Experimental)
Use this for real-time development without re-installing.
pip install --no-build-isolation -ve . --config-settings=editable.rebuild=true -Cbuild-dir=build
Export Support
The following models have been tested :
| Model | float32 | int8 |
|---|---|---|
| LeNet | ✔ | ✔ |
| ResNet18 | ❌ | ✔ |
On the table above, validation is done using the aidge_cmp option, which evaluates the results between the aidge_backend_cpu and aidge_export_cpp kernels, with an absolute precision of 10^-3 (for float exports).
An example script is provided for each of these models (examples/export_<model_name>/<model_name>.py).
Metadata
Release files for aidge-export-cpp 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aidge_export_cpp-0.11.0-py3-none-any.whl | Python 3 | none | any | Details for aidge_export_cpp-0.11.0-py3-none-any.whl |
Release files / aidge_export_cpp-0.11.0-py3-none-any.whl
| Download URL | aidge_export_cpp-0.11.0-py3-none-any.whl |
|---|---|
| Size | 233.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1a041c324b58648c3a507d9e768ca464dbdb7c4fc2d2e8e8bb7324959129770
|
|
BLAKE2b-256 checksum How to use checksums |
46a9f339dd2634297552e2486b9f597529b9894dd85833f6631915f7de0b4d73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for aidge-export-cpp 0.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.