
Eclipse Aidge
Aidge is a powerful open-source framework for optimizing and deploying deep neural networks on embedded systems.
It provides a comprehensive toolkit for manipulating computational graphs, with seamless integration for popular frameworks through ONNX and PyTorch interfaces. Whether you need to quantize models, map them to specialized hardware accelerators, or generate optimized code for various targets (CPU, GPU, FPGA, custom accelerators), Aidge offers a modular and flexible solution. The framework excels in DNN design exploration, allowing rapid prototyping and automated performance benchmarking while supporting multiple hardware export targets including OpenMP, OpenCL, CUDA, cuDNN, and TensorRT.
Useful Links
- Documentation
- Installation Guide
- Contributing Guidelines
- Issue Tracker
- Available Modules
- The official chat of the project.
Quick Start
System Requirements
Python >= 3.8
Additional requirements may vary by module. Please check individual module documentation for details.
Installation
Aidge is built on a core library that interfaces with multiple modules binded to python libraries.
Each module must be installed independently, aidge_core
included.
# We recommend creating a Python environment to work with Aidge
python<your_python_version> -m venv env_aidge
source env_aidge/bin/activate
1. Using pip (Recommended) (only available on Linux)
Install aidge_core
and selected modules:
# install full bundle
# - `aidge_core`
# - `aidge_backend_cpu`
# - `aidge_backend_cuda`
# - `aidge_backend_opencv`
# - `aidge_export_cpp`
# - `aidge_export_arm_cortexm`
# - `aidge_learning`
# - `aidge_onnx`
# - `aidge_quantization`
pip install -r default_module_intall.txt
# install selected modules, for example to import an ONNX, quantize the model and export it to a standalone CPP directory
pip install aidge-core aidge-backend-cpu aidge-learning aidge-export-cpp aidge-onnx aidge-quantization
Feel free to install other modules from the list of availalbe submodules if you need them with this bundle.
2. Build from Source
System requirements
CMake >= 3.18
This repository has several submodules.
For this reason when cloning this repository you need to use the --recursive
option.
# Clone repository with submodules
git clone --recursive https://gitlab.eclipse.org/eclipse/aidge/aidge.git
Build on Linux & MacOS
For Python development
# Build every Python modules
./setup.sh --all --release --python
# Or build specific modules
# Notice how it compiles modules named `aidge_<module_name>` by calling `-m <module_name>`
./setup.sh -m core -m backend_cpu -m onnx --release --python
For C++ development
# Build C++ library only by removing `--python`
./setup.sh --all --release
# Or build specific modules
./setup.sh -m core -m backend_cpu --release
# Debug build with tests
./setup.sh -m core -m backend_cpu --debug --tests
For more build options, run: ./setup.sh -h
Build on Windows
On your session,
- Install required tools:
- Visual Studio Community with MSVC: https://visualstudio.microsoft.com/fr/vs/community/
- Git (Source code control program): https://git-scm.com/download
- CMake (Solution for managing the software build process): https://cmake.org/download/
- Python (includes pip): https://www.python.org/download/
- Visual Studio Code: https://code.visualstudio.com/download with the following extensions
- Python
- CMake
- Set up Python environment:
# Create virtual environment
python -m venv env_aidge
# Activate environment
.\env_aidge\Scripts\activate
- Install Aidge:
# Clone repository
git clone --recursive https://gitlab.eclipse.org/eclipse/aidge/aidge.git
# Navigate to repository
cd aidge
For Python development:
Add the -Python
option to your command.
# Build every Python module in Release mode
.\setup.ps1 -All -Release -Python
# Or build specific modules with Python bindings
.\setup.ps1 -Modules core,backend_cpu,onnx -Release -Python
For C++ development:
# Build C++ library only in Release mode
.\setup.ps1 -All -Release
# Debug build with tests
.\setup.ps1 -Modules core,backend_cpu,onnx -Debug -Tests
Run .\setup.ps1 -h
to see all available options and parameters.
3. Using Docker
Feel free to use one of the Dockerfiles available in the docker
folder.
# Build image
docker build --pull --rm -f "docker/dockerfile.Dockerfile" -t aidge:latest .
# Run container
docker run --name aidge-container -it aidge:latest
Verify installation
python -c "import aidge_core; import aidge_backend_cpu; print(aidge_core.Tensor.get_available_backends())"
# Expected output: {'cpu'}
Bundle components
Modules source code
- core
- [backend]
- ONNX interoperability
- [export]
- quantization
Modules status
Module | Status | Coverage |
---|---|---|
aidge_core |
|
|
aidge_backend_cpu |
|
|
aidge_backend_cuda |
|
|
aidge_export_cpp | ||
aidge_onnx |
Stay tuned !
Here is a link to the official matrix chat of the project.
Contributing
If you would like to contribute to the Aidge project, we would be happy to have your help!
Everyone is welcomed to contribute to the code via merge requests, file issues on Gitlab, help people asking for help, or any other way!
To get started you can head to the wiki home page and look for contribution section.
We grant commit access (which allows to work on the official project instead of a fork & gived full rights to the issue database(label modification)) to people who have gained our trust and demonstrated a commitment to Aidge.
License
Aidge is licensed under Eclipse Public License 2.0, as found in the LICENSE.