Catalog PyPI
PACKAGE EXPLORERView in registry

aidge-export-cpp

PyPI

Aidge CPP generic export

Versions collected1
Direct dependencies3From release 0.10.1
Last observed21 Oct, 10:28 UTC

README

Version 0.10.1 documentation

Aidge logo

EPL 2.0 Examples PyPi Examples Documentation Status GitLab Contributors Open GitLab Issues Closed GitLab Issues

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 :

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:

ProfileBehavior
strictCompile a separate binary with additional warnings promoted to errors.
cppcheckRun Cppcheck checks focused on likely defects.
cppcheck-strictRun broader Cppcheck style, performance and portability checks.
clang-tidyRun the Clang static analyzer checks.
clang-tidy-strictAdd bug-prone, performance and portability checks.
static-analysisRun the standard Cppcheck and Clang-Tidy profiles.
static-analysis-strictRun 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):

1. Python installation using setup scripts

EnvironmentPython Development
Windows.\setup.ps1 -Modules export_cpp -Tests
Unix./setup.sh -m export_cpp --tests

[!TIP] Use Get-Help setup.ps1 (Windows) or ./setup.sh -h (Unix) for full documentation.

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 :

Modelfloat32int8
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).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.10.117 Sept 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e1d1f8cd3f58b9aff66b5b8384803a4da283799cd06130f1a91c361106b4fc7c