Skip to main content

Core algorithms for operators and graph of the AIDGE framework

Project description

Pipeline status C++ coverage Python coverage

Aidge Core library

You can find here the C++ code of the Core library of Aidge.

[TOC]

Pip installation

To install aidge_core using pip, run the following command in your python environnement :

pip install . -v

TIPS : Use environment variables to change compilation options:

  • AIDGE_INSTALL : to set the installation folder. Defaults to <python_prefix>/lib/libAidge
  • AIDGE_PYTHON_BUILD_TYPE : to set the compilation mode to Debug or Release or "" (for default flags). Defaults to Release.
  • AIDGE_BUILD_GEN : to set the build backend (for development mode) or "" for the cmake default. Default to "".
  • AIDGE_BUILD_TEST : to build the C++ unit tests. Set to "ON" or "OFF". Default to "OFF".

Pip installation for development

To setup aidge_core using pip in development (or editable mode), use the --no-build-isolation -e options to pip.

For instance run the following command in your python environnement for a typical setup :

export AIDGE_BUILD_TEST=ON              # enable C++ unit tests
export AIDGE_PYTHON_BUILD_TYPE=         # default flags (no debug info but fastest build time)
export AIDGE_PYTHON_BUILD_TYPE=Debug    # or if one really need to debug the C++ code
pip install -U pip setuptools setuptools_scm[toml] cmake   # Pre-install build requirements (refer to the pyproject.toml [build-system] section)
pip install -v --no-build-isolation -e .

In this configuration python files can be modified directly without re-installation.

The C++ build dir will be created in build/ and recompilation and install of python bindings can be done directly with:

make -C build install -j $(nproc)
# or with cmake
cmake --build build -j $(nproc) && cmake --install build

One can also use an alternate cmake build backend such as ninja which can be installed easily though pip, for instance :

pip install -U ninja
export AIDGE_BUILD_GEN=Ninja
pip install -v --no-build-isolation -e .

In this case ninja is used instead of make as build backend, and recompilation when needed is done with:

ninja -C build install  # note that by default ninja use available parallelism, no need for -j option
# or with cmake
cmake --build build && cmake --install build

Note that python development (or editable mode) is not always robust to changes in the python package setup, or when changing the build backend with AIDGE_BUILD_GEN. In order to re-install when the build breaks, re-execute the commands:

rm -rf *-egg-info build/
pip install -v --no-build-isolation -e .

Standard C++ Compilation

Create two directories build and ìnstall.

Then inside build :

cmake -DCMAKE_INSTALL_PREFIX:PATH=$(path_to_install_folder) $(CMAKE PARAMETERS) $(projet_root)

make all install

Compilation options

Option Value type Description
-DCMAKE_INSTALL_PREFIX:PATH str Path to the install folder
-DCMAKE_BUILD_TYPE str If Debug, compile in debug mode, Release compile with highest optimisations or "" (empty) , default= Release
-DWERROR bool If ON show warning as error during compilation phase, default=OFF
-DTEST bool If ON build C++ unit tests, default=ON
-DPYBIND bool If ON activate python binding, default=OFF
-DPYBIND_INSTALL_PREFIX:PATH str Path to the python module install folder when -DPYBIND=ON, defaults to $CMAKE_INSTALL_PREFIX/python_packages/<module>

If one compiles with -DPYBIND=ON, -DPYBIND_INSTALL_PREFIX:PATH can be used to install the python module directly in the python sources tree (for instance $PWD/aidge_core). setup.py takes care of this and installs the module at the right place.

Run tests

CPP

Inside of the build file run:

ctest --output-on-failure

Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

aidge_core-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

aidge_core-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

aidge_core-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

Details for the file aidge_core-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aidge_core-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bdba0b2b747202aed161e32fc8a25caa5eb38e64367a27e9898c45a66784f0b6
MD5 ee0e42c8215c040816a82370c0ba29af
BLAKE2b-256 85b02e9839d74fe06d49aef6f080c486c1c3ddf485f0b4e775fd58e46ad2bb95

See more details on using hashes here.

File details

Details for the file aidge_core-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aidge_core-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca0705be9f0335f8a6024fe1f09fed8df7eb2c4049c844ae23cdde8532c02148
MD5 19a2bd08e81023d306f12c2e033cb241
BLAKE2b-256 edbbcac88909f54386e3bde60016ded2d5cf31244d22ff2a09ee3269cd6be90f

See more details on using hashes here.

File details

Details for the file aidge_core-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aidge_core-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6c5a455abb4f3f22a6a5c4402a401ac70d9c571481718bc8084b3b2be47cab0
MD5 cc45e7cb1db3cdec76ce4b28adecc8f3
BLAKE2b-256 6b57a790fd16e8f2a76ab81e8a404c5414a3f4a39560fa87340de96a0324d018

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page