Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • eclipse/aidge/aidge
  • jsimatic/aidge
  • hrouis/aidge
  • jgirardsatabin/aidge
  • nthm/aidge
  • mszczep/aidge
  • bhalimi/aidge-bh
  • lucaslopez/aidge
  • mick94/aidge
  • hleborgne/aidge
  • jeromeh/aidge
  • axelfarr/aidge
  • noamzerah/NZ-fork
  • lrakotoarivony/aidge
  • bobot/aidge
  • maab05/aidge
  • cguillon/aidge
  • mnewson/aidge
  • farnez/aidge
  • idealbuq/aidge
20 results
Show changes
Commits on Source (794)
Showing
with 508 additions and 9 deletions
*.onnx filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
# C++ Build
build*/
install*/
# VSCode
.vscode
# Python
*.so
__pycache__
*.pyc
*.egg-info
# Mermaid
*.mmd
# Doxygen
xml*/
# log file
*.log
# user_tests
/user_tests/
# env virtual
env_aidge/
# pytorch models
*.pt
# gnu compression
*.gz
# ONNX
*.onnx
###############################################################################
# Aidge Continious Integration and Continious Deployment #
# #
###############################################################################
stages:
# Build Aidge
- build
- test
- doc
include:
- local: '/.gitlab/ci/_global.gitlab-ci.yml'
- local: '/.gitlab/ci/build.gitlab-ci.yml'
- local: '/.gitlab/ci/test.gitlab-ci.yml'
- local: '/.gitlab/ci/doc.gitlab-ci.yml'
################################################################################
# Centralized definitions of common job parameter values. #
# Parameters with many optional configurations may be in separate files. #
# #
################################################################################
variables:
GIT_SUBMODULE_STRATEGY: recursive
OMP_NUM_THREADS: 4
GIT_SSL_NO_VERIFY: 1
DEBIAN_FRONTEND: noninteractive
default:
image: nvidia/cuda:12.2.0-devel-ubuntu22.04
before_script:
- apt update
- apt install -y cmake python-is-python3 pip git
- apt install -y libcudnn8-dev
- apt install -y libopencv-dev
- apt install -y doxygen
- apt install -y pandoc
build:ubuntu_cpp:
stage: build
needs: []
tags:
- docker
script:
- ./setup.sh --all --tests --release
build:ubuntu_python:
stage: build
needs: []
tags:
- docker
script:
- python3 -m pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- |
python3 -m pip install \
pytest \
onnxruntime \
torch \
requests
- ./setup.sh --all --python --tests --release
artifacts:
expire_in: 1 week
paths:
- venv/
include:
- project: 'eclipsefdn/it/releng/gitlab-runner-service/gitlab-ci-templates'
file: 'pipeline-autodevops.gitlab-ci.yml'
- project: 'eclipsefdn/it/releng/gitlab-runner-service/gitlab-ci-templates'
file: '/jobs/git.gitlab-ci.yml'
doc:build:
stage: doc
needs: [build:ubuntu_python]
tags:
- docker
script:
- source venv/bin/activate
- cd docs
- python -m pip install -r requirements.txt
- make html
- cd ..
artifacts:
expire_in: 1 week
paths:
- docs/build
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
doc:publish:
extends: .ef-git
stage: doc
needs:
- job: doc:build
artifacts: true
tags:
- origin:eclipse # allow to target eclipse runner
variables:
GIT_REMOTE_URL: "git@gitlab.eclipse.org:eclipse/aidge/host_documentation.git"
GIT_INIT_DIR: "docs/build/html"
GIT_INIT_DEFAULT_BRANCH: "$CI_DEFAULT_BRANCH"
script:
- |
git add -A
if ! git diff --cached --exit-code; then
echo "Changes have been detected, publishing to repo '$GIT_REMOTE_URL'"
git commit -m "Website build - job: $CI_JOB_NAME-$CI_JOB_ID \
Build logs: $CI_JOB_URL"
git log --graph --abbrev-commit --date=relative -n 5
git push origin HEAD:$CI_DEFAULT_BRANCH;
else
echo "No changes have been detected, nothing to publish"
fi
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
test:tutorials:
stage: test
needs : ["build:ubuntu_python"]
tags:
- docker
before_script:
- apt-get update -qq
- apt install -y -q python-is-python3 python3-pip
- python3 -m pip install virtualenv
- source venv/bin/activate
- python3 -m pip install matplotlib ipykernel ipython
- pip install nbmake pytest-xdist
parallel:
matrix:
- NOTEBOOK:
- "101_first_step/101_first_step.ipynb"
# - "Database_DataProvider_tutorial/Database.ipynb"
# note: error https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/229
# - "Backend_cuda_tutorial/Backend_cuda.ipynb"
- "export/aidge_to_STM32/export_LeNet/export_lenet_fp32.ipynb"
- "export/aidge_to_cpp/add_custom_operator/add_custom_operator.ipynb"
- "export/aidge_to_cpp/export_LeNet/export_lenet_fp32.ipynb"
- "GraphMatching/graph_matching.ipynb"
- "Learning/learn.ipynb"
# - "Hardmax_operator/operator_adding.ipynb"
- "Onnx_tutorial/onnx_tuto.ipynb"
- "PTQ_tutorial/ptq_tuto.ipynb"
- "Scheduling/scheduling.ipynb"
- "Tiling_tutorial/tiling.ipynb"
# - "TRT_Quantization_tutorial/tuto.ipynb"
script:
- pytest --nbmake -n=auto "examples/tutorials/$NOTEBOOK"
artifacts:
expire_in: 1 week
paths:
- venv/
[submodule "aidge/aidge_core"]
path = aidge/aidge_core
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_core.git
[submodule "aidge/aidge_cpu"]
path = aidge/aidge_backend_cpu
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu.git
[submodule "aidge/aidge_onnx"]
path = aidge/aidge_onnx
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_onnx.git
[submodule "aidge/aidge_export_cpp"]
path = aidge/aidge_export_cpp
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_export_cpp.git
[submodule "aidge/aidge_backend_cuda"]
path = aidge/aidge_backend_cuda
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cuda.git
[submodule "aidge/aidge_quantization"]
path = aidge/aidge_quantization
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_quantization.git
[submodule "aidge/aidge_backend_opencv"]
path = aidge/aidge_backend_opencv
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_opencv.git
[submodule "aidge/aidge_learning"]
path = aidge/aidge_learning
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_learning.git
[submodule "aidge/aidge_export_arm_cortexm"]
path = aidge/aidge_export_arm_cortexm
url = https://gitlab.eclipse.org/eclipse/aidge/aidge_export_arm_cortexm.git
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
submodules:
include: all
recursive: true
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
apt_packages:
- build-essential
- cmake
jobs:
pre_build:
- AIDGE_INSTALL=$READTHEDOCS_VIRTUALENV_PATH/install pip install ./aidge/aidge_core -v
- AIDGE_INSTALL=$READTHEDOCS_VIRTUALENV_PATH/install pip install ./aidge/aidge_backend_cpu -v
- pip install onnx
- AIDGE_INSTALL=$READTHEDOCS_VIRTUALENV_PATH/install pip install ./aidge/aidge_onnx -v
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
builder: html
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
include MANIFEST.in
include LICENSE
include README.md
include CMakeLists.txt
recursive-include cmake *
recursive-include aidge *
include setup.py
include version.txt
\ No newline at end of file
# Aidge <picture align="center">
<img src="docs/source/_static/Logotype-aidge.png" alt="Aidge logo" width="800"/>
</picture>
[![License-badge](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](LICENSE) [![License-badge](https://img.shields.io/badge/License-EPL%202.0-blue.svg)](LICENSE) [![Documentation Status](https://readthedocs.org/projects/eclipse-aidge/badge/?version=latest)](https://eclipse-aidge.readthedocs.io/en/latest/?badge=latest)
description du framework # Eclipse Aidge
peut etre mettre mention a deepgreen **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](https://eclipse.dev/aidge/)
- [Installation Guide](#installation)
- [pip](#1-using-pip-recommended-only-available-on-linux) (Recommended): Quickest way to get started
- [Build](#2-build-from-source) from Source: For development or customization
- [Docker](#3-using-docker): For containerized deployment
- [Contributing Guidelines](https://gitlab.eclipse.org/groups/eclipse/aidge/-/wikis/Contributing)
- [Issue Tracker](https://gitlab.eclipse.org/groups/eclipse/aidge/-/issues)
- [Available Modules](https://gitlab.eclipse.org/eclipse/aidge)
- [The official chat of the project](https://chat.eclipse.org/#/room/#aidge:matrix.eclipse.org).
## Quick Start
**System Requirements**
- ``Python >= 3.8``
Additional requirements may **vary by module**. Please check individual module documentation for details.
## Installation ## Installation
## Docker Image 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.
```bash
# 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:
```bash
# 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](https://gitlab.eclipse.org/eclipse/aidge) if you need them with this bundle. <br>
### 2. Build from Source
**System requirements**
- ``CMake >= 3.18``
This repository has several [submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
For this reason when cloning this repository you need to use the ``--recursive`` option.
```bash
# Clone repository with submodules
git clone --recursive https://gitlab.eclipse.org/eclipse/aidge/aidge.git
```
#### Build on Linux & MacOS
##### For Python development
```bash
# 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
```bash
# 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,
1) 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
2) Set up Python environment:
```powershell
# Create virtual environment
python -m venv env_aidge
# Activate environment
.\env_aidge\Scripts\activate
```
3) Install Aidge:
```powershell
# 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.
```powershell
# 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:
```powershell
# 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`](docker) folder.
```bash
# 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
```bash
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](https://gitlab.eclipse.org/eclipse/aidge/aidge_core)
- [backend]
- [reference CPU](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu)
- [CUDA](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cuda)
- [OpenCV](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_opencv)
- [ONNX interoperability](https://gitlab.eclipse.org/eclipse/aidge/aidge_onnx)
- [export]
- [reference CPP](https://gitlab.eclipse.org/eclipse/aidge/aidge_export_cpp)
- [ARM-CortexM](https://gitlab.eclipse.org/eclipse/aidge/aidge_export_arm_cortexm)
- [quantization](https://gitlab.eclipse.org/eclipse/aidge/aidge_quantization)
## Modules status
| Module | Status | Coverage |
| -------- | ------- | ------- |
| [aidge_core](https://gitlab.eclipse.org/eclipse/aidge/aidge_core) | ![Pipeline status](https://gitlab.eclipse.org/eclipse/aidge/aidge_core/badges/main/pipeline.svg?ignore_skipped=true) | ![C++ coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_core/badges/main/coverage.svg?job=coverage:ubuntu_cpp&key_text=C%2B%2B+coverage&key_width=90) ![Python coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_core/badges/main/coverage.svg?job=coverage:ubuntu_python&key_text=Python+coverage&key_width=100) |
| [aidge_backend_cpu](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu) | ![Pipeline status](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu/badges/main/pipeline.svg?ignore_skipped=true) | ![C++ coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu/badges/main/coverage.svg?job=coverage:ubuntu_cpp&key_text=C%2B%2B+coverage&key_width=90) ![Python coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu/badges/main/coverage.svg?job=coverage:ubuntu_python&key_text=Python+coverage&key_width=100) |
| [aidge_backend_cuda](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cuda) | ![Pipeline status](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cuda/badges/main/pipeline.svg?ignore_skipped=true) | ![C++ coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cuda/badges/main/coverage.svg?job=coverage:ubuntu_cpp&key_text=C%2B%2B+coverage&key_width=90) ![Python coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cuda/badges/main/coverage.svg?job=coverage:ubuntu_python&key_text=Python+coverage&key_width=100) |
| [aidge_export_cpp](https://gitlab.eclipse.org/eclipse/aidge/aidge_export_cpp) | | |
| [aidge_onnx](https://gitlab.eclipse.org/eclipse/aidge/aidge_onnx) | ![Pipeline status](https://gitlab.eclipse.org/eclipse/aidge/aidge_onnx/badges/main/pipeline.svg?ignore_skipped=true) | ![Python coverage](https://gitlab.eclipse.org/eclipse/aidge/aidge_onnx/badges/main/coverage.svg?job=coverage:ubuntu_python&key_text=Python+coverage&key_width=100) |
## Stay tuned !
Here is a link to [the official matrix chat of the project](https://chat.eclipse.org/#/room/#aidge:matrix.eclipse.org).
## Contributing ## 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](https://gitlab.eclipse.org/groups/eclipse/aidge/-/wikis/home) 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 ## License
Aidge has a Eclipse Public License 2.0, as found in the [LICENSE](LICENSE) Aidge is licensed under Eclipse Public License 2.0, as found in the [LICENSE](LICENSE).
\ No newline at end of file
# Filter to ignore non submodule files
*
!.gitignore
!aidge_backend_cpu
!aidge_backend_cuda
!aidge_backend_opencv
!aidge_core
!aidge_export_arm_cortexm
!aidge_export_cpp (untracked content)
!aidge_learning
!aidge_onnx
!aidge_quantization
# This makefile does nothing but delegating the actual building to cmake
BUILDDIR := build
MAKEFLAGS := --no-print-directory
\ No newline at end of file
Subproject commit b2e93d76611607dcaa9de852e70418c50db722fb
Subproject commit 3e847c1bc221e239499af7961ce76c6db3263522
Subproject commit 04f6b4f21ae268f2e469e7d03ad0075a87e5b280
Subproject commit 9551547462a599325cce5fa68800e7adbb50404a