Skip to main content

Design, train and compile neural networks optimized specifically for FPGAs.

Project description

ElasticAI.creator

Design, train and compile neural networks optimized specifically for FPGAs. Obtaining a final model is typically a three stage process.

  • design and train it using the layers provided in the elasticai.creator.nn package.
  • translate the model to a target representation, e.g. VHDL
  • compile the intermediate representation with a third party tool, e.g. Xilinx Vivado (TM)

This version currently only supports parts of VHDL as target representations.

The project is part of the elastic ai ecosystem developed by the Embedded Systems Department of the University Duisburg-Essen. For more details checkout the slides at researchgate.

Table of contents

Users Guide

Install

You can install the ElasticAI.creator as a dependency using pip:

python3 -m pip install "elasticai.creator"

On PyPi the latest tagged version is published.

Currently, we do not automatically pack and push the code to PyPi. If you want to make sure to use the latest version from the main branch, you can install the ElasticAI.creator as a dependency via git:

python3 -m pip install git+https://github.com/es-ude/elastic-ai.creator.git@main

Minimal Example

In examples you can find a minimal example. It shows how to use the ElasticAI.creator to define and translate a machine learning model to VHDL. It will save the generated VHDL code to a directory called build_dir. Furthermore, it will generate a skeleton for the Elastic Node V5 that you can use to interface with your machine learning model on the FPGA via a C stub (defined in the elastic-ai.runtime.enV5).

Features

  • Modular architecture for adding new custom VHDL components
  • Translation from IR to VHDL (combinatorial)
  • Builtin VHDL components:
    • time multiplexed networks
    • counter
    • shift registers
    • sliding window
    • grouped filters

Supported network architectures and layers

  • all sequential network architectures representable with torch.nn.Sequential
  • fixed-point quantized:
    • layers: linear, linear with batch normalization, LSTM
    • activations: hard sigmoid, hard tanh, ReLU
      • precomputed: sigmoid, tanh, adaptable SiLU

Planned network architectures and layers supported in the future

  • integer-only linear quantization
  • 1D convolutional layers (fixed-point)
  • gated recurrent unit (fixed-point)

Modules in development:

  • elasticai.creator.nn.fixed_point.conv1d

Deprecated modules (removal up to discussion):

  • elasticai.creator.nn.binary (binary quantization)
  • elasticai.creator.nn.float (limited-precision floating-point quantization)
  • elasticai.creator.nn.fixed_point.mac

General limitations

By now we only support sequential models for our translations. That excludes skip and residual connections.

Structure of the Project

The structure of the project is as follows. The creator folder includes all main concepts of our project, especially the qtorch implementation which is our implementation of quantized PyTorch layer. It also includes the supported target representations, like the subfolder nn is for the translation to vhdl. Additionally, we have unit and integration tests in the tests folder.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

elasticai_creator-0.68.0.tar.gz (804.4 kB view details)

Uploaded Source

Built Distribution

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

elasticai_creator-0.68.0-py3-none-any.whl (725.7 kB view details)

Uploaded Python 3

File details

Details for the file elasticai_creator-0.68.0.tar.gz.

File metadata

  • Download URL: elasticai_creator-0.68.0.tar.gz
  • Upload date:
  • Size: 804.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for elasticai_creator-0.68.0.tar.gz
Algorithm Hash digest
SHA256 83c269c0abc42825faae1dd33a2d4ddbd110404f788840ec68463b45199d39e6
MD5 c33cce853de527395b5c2d6740e0ec19
BLAKE2b-256 beb502a980e8d969e6b35aa827ebeb64927744da9d906c0e70da8be6736346ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for elasticai_creator-0.68.0.tar.gz:

Publisher: release.yaml on es-ude/elastic-ai.creator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file elasticai_creator-0.68.0-py3-none-any.whl.

File metadata

File hashes

Hashes for elasticai_creator-0.68.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb3794b95a3c071908e9924455a7bdd89604b3140791789c767a27c215879da7
MD5 ac798423bb754f32558b40dbfcce1f60
BLAKE2b-256 2bd24937fe4fb01128f68ae7561e84d50d53137e05d869c4b09d69b57f1bfc20

See more details on using hashes here.

Provenance

The following attestation bundles were made for elasticai_creator-0.68.0-py3-none-any.whl:

Publisher: release.yaml on es-ude/elastic-ai.creator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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