Skip to main content

Deeploy - DNN Compiler for Heterogeneous SoCs

Project description

Logo

Deeploy: DNN Compiler for Heterogeneous SoCs

PyPIDocumentation Status CI Deeploy Docker GitHub last commit License

Deeploy is an ONNX-to-C compiler that generates low-level optimized C Code for multi-cluster, heterogeneous SoCs. Its goal is to enable configurable deployment flows from a bottom-up compiler perspective, modeling target hardware in a fine-grained and modular manner.

Deeploy is developed as part of the PULP project, a joint effort between ETH Zurich and the University of Bologna.

Documentation & Tutorials

You can find the documentation at the following links:

A DeepWiki generated documentation is availabe here.

Getting started

Download the repository and its submodules:

git clone https://github.com/pulp-platform/Deeploy.git && cd Deeploy
git submodule update --init --recursive

Installing Deeploy is as simple as running:

pip install -e .

However, to run the code generated by Deeploy on a certain target, you need the toolchains and the simulators associated with this platform.

We provide a Docker container where Deeploy works Out-of-the-Box (i.e. with all the dependencies pre-installed). To pull the docker image, run:

docker pull ghcr.io/pulp-platform/deeploy:main

Then you can create and start the container in interactive mode with:

docker run -it --name deeploy_main -v $(pwd):/app/Deeploy ghcr.io/pulp-platform/deeploy:main

Install Deeploy inside the container in editable mode:

cd Deeploy
pip install -e .

Congratulations, you installed Deeploy and its dependencies! Now, to test your installation let's run one simple test on each platform with the following commands:

cd DeeployTest
python deeployRunner_generic.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_cortexm.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_mempool.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_snitch.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_tiled_snitch.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_siracusa.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_tiled_siracusa.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_tiled_siracusa_w_neureka.py -t ./Tests/Kernels/Integer/Add/Regular
python deeployRunner_softhier.py -t ./Tests/Kernels/Integer/Add/Regular --toolchain=GCC
python deeployRunner_chimera.py -t ./Tests/Kernels/Integer/Add/Regular

To restart and connect to the container, run:

docker start -i deeploy_main
cd Deeploy

You can find the ONNX file in DeeployTest/Tests/Kernels/Integer/Add/Regular, to visualize it, you can use Netron. You can also find the generated code for the platform X in TEST_X in DeeployTest and you should notice that the generated code for the Add test is very simple. However, this gets more complex when you add tiling. Let's generate the code for a single layer but using tiling this time:

python deeployRunner_tiled_siracusa.py -t Tests/Kernels/Integer/MatMul/Regular --cores=8 --l1=16000

Now you can open the generated code in DeeployTest/TEST_SIRACUSA/Tests/testMatMul/Network.c and see how we executed a tiled layer.

Supported Platforms

Platform Hardware Simulator CI Status
Generic CPU Your laptop CPU :) Host CI • Generic
CortexM Processors Documentation QEMU CI • Cortex-M
MemPool + ITA Mempool paper, ITA paper Banshee CI • Mempool
Siracusa Siracusa paper GVSoC CI • Siracusa CI • Siracusa (Tiled) CI • Siracusa + Neureka (Tiled)
Snitch Cluster Snitch paper GVSoC CI • Snitch CI • Snitch (Tiled)
SoftHier Repo GVSoC CI • SoftHier
Chimera Repo GVSoC CI • Chimera

Publications

If you use Deeploy in your work or research, you can cite us with:

ESWEEK 2024: Deeploy: Enabling Energy-Efficient Deployment of Small Language Models On Heterogeneous Microcontrollers

@article{schererDeeployEnablingEnergyEfficient2024,
  title = {Deeploy: {{Enabling Energy-Efficient Deployment}} of {{Small Language Models}} on {{Heterogeneous Microcontrollers}}},
  shorttitle = {Deeploy},
  author = {Scherer, Moritz and Macan, Luka and Jung, Victor J. B. and Wiese, Philip and Bompani, Luca and Burrello, Alessio and Conti, Francesco and Benini, Luca},
  year = {2024},
  month = nov,
  journal = {IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems},
  volume = {43},
  number = {11},
  pages = {4009--4020},
  issn = {1937-4151},
  doi = {10.1109/TCAD.2024.3443718},
}

The preprint is available on arXiv @ arXiv:2408.04413.

IEEE Design & Test: Toward Attention-based TinyML: A Heterogeneous Accelerated Architecture and Automated Deployment Flow

@article{WieseTowardAttentionBasedTinyML2025,
  author={Wiese, Philip and İslamoğlu, Gamze and Scherer, Moritz and Macan, Luka and Jung, Victor J.B. and Burrello, Alessio and Conti, Francesco and Benini, Luca},
  journal={IEEE Design & Test},
  title={Toward Attention-based TinyML: A Heterogeneous Accelerated Architecture and Automated Deployment Flow},
  year={2025},
  pages={1-1},
  keywords={Tiny machine learning;Transformers;Memory management;Hardware acceleration;Bandwidth;Registers;Software;Engines;Energy efficiency;Computational modeling;Neural Networks;TinyML;Deployment;Transformers;Accelerators},
  doi={10.1109/MDAT.2025.3527371}}

The preprint is available on arXiv @ arXiv:2408.02473.

License

All licenses used in this repository are listed under the LICENSES folder. Unless specified otherwise in the respective file headers, all code checked into this repository is made available under a permissive license.

To extract license information for all files, you can use the reuse tool and by running reuse spdx in the root directory of this repository.

Project details


Download files

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

Source Distribution

deeploy_pulp-0.2.1.tar.gz (252.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deeploy_pulp-0.2.1-py3-none-any.whl (419.5 kB view details)

Uploaded Python 3

File details

Details for the file deeploy_pulp-0.2.1.tar.gz.

File metadata

  • Download URL: deeploy_pulp-0.2.1.tar.gz
  • Upload date:
  • Size: 252.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for deeploy_pulp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c411ec694ae1dbb223c49e05e049ec5ac91426b0cb50013d5e85355783bbe5b1
MD5 5c986fcddbff07fc77f16b02dc42ea94
BLAKE2b-256 2b171f3cb2ec814b1f0a8fdb80ceec9a5a37eb9be9db5d40829a3c0537608bc8

See more details on using hashes here.

File details

Details for the file deeploy_pulp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: deeploy_pulp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 419.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for deeploy_pulp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3cdf955052c6226d06e15c2ddb19c43e4b05caba0868bfa4c69f79c35ef4f93
MD5 a62bc9fd6b3febdb51b7d3487ab3aa1c
BLAKE2b-256 194e9f812eb3d8572b3dbd25f9bfb53e93c46f5f379337a6d04bffa1c391780c

See more details on using hashes here.

Supported by

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