elastic-ai.creator开源程序是设计、训练和生成专门针对 FPGA 优化的神经网络

发布于:2025-06-28 ⋅ 阅读:(18) ⋅ 点赞:(0)

​一、软件介绍

文末提供程序和源码下载

elastic-ai.creator开源程序是设计、训练和生成专门针对 FPGA 优化的神经网络,

获得最终模型通常是一个三个阶段的过程。

  • design and train it using the layers provided in the elasticai.creator.nn package.
    使用 elasticai.creator.nn 包中提供的层对其进行设计和训练。
  • translate the model to a target representation, e.g. VHDL
    将模型转换为目标表示形式,例如 VHDL
  • compile the intermediate representation with a third party tool, e.g. Xilinx Vivado (TM)
    使用第三方工具编译中间表示,例如 Xilinx Vivado (TM)

This version currently only supports parts of VHDL as target representations.
此版本目前仅支持将 VHDL 的一部分作为目标表示形式。

二、Install 安装

You can install the ElasticAI.creator as a dependency using pip:
您可以使用 pip 将 ElasticAI.creator 安装为依赖项:

python3 -m pip install "elasticai.creator"

On PyPi the latest tagged version is published.
在 PyPi 上,将发布最新的标记版本。

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:
目前,我们不会自动将代码打包并推送到 PyPi。如果您想确保使用来自主分支的最新版本,您可以通过 git 将 ElasticAI.creator 安装为依赖项:

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).
在示例中,您可以找到一个最小示例。它展示了如何使用 ElasticAI.creator 定义机器学习模型并将其转换为 VHDL。它会将生成的 VHDL 代码保存到名为 build_dir .此外,它还将为 Elastic Node V5 生成一个框架,您可以使用该框架通过 C 存根(在 elastic-ai.runtime.enV5 中定义)与 FPGA 上的机器学习模型进行交互。

三、Features 特征

  • Modular architecture for adding new custom VHDL components
    用于添加新的自定义 VHDL 组件的模块化架构
  • Translation from IR to VHDL (combinatorial)
    从 IR 到 VHDL 的转换(组合)
  • Builtin VHDL components:
    内置 VHDL 组件:
    • time multiplexed networks
      时间多路复用网络
    • counter 计数器
    • shift registers 移位寄存器
    • sliding window 滑动窗
    • grouped filters 分组筛选器
Supported network architectures and layers
支持的网络架构和层
  • all sequential network architectures representable with torch.nn.Sequential
    所有顺序网络架构都可以用 torch.nn.Sequential
  • fixed-point quantized:  定点量化:
    • layers: linear, linear with batch normalization, LSTM
      图层:线性、带批量归一化的线性、LSTM
    • activations: hard sigmoid, hard tanh, ReLU
      激活: hard sigmoid, hard tanh, ReLU
      • precomputed: sigmoid, tanh, adaptable SiLU
        预计算:sigmoid、tanh、自适应 SiLU
Planned network architectures and layers supported in the future
未来支持的规划网络架构和层
  • integer-only linear quantization
    仅整数线性量化
  • 1D convolutional layers (fixed-point)
    1D 卷积层(定点)
  • 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.binary (二进制量化)
  • elasticai.creator.nn.float (limited-precision floating-point quantization)
    elasticai.creator.nn.float (有限精度浮点量化)
  • elasticai.creator.nn.fixed_point.mac
General limitations 一般限制

By now we only support sequential models for our translations. That excludes skip and residual connections.
到目前为止,我们只支持翻译的 Sequential 模型。这不包括 skip 连接和剩余连接。

软件下载

迅雷云盘

本文信息来源于GitHub作者地址:https://github.com/es-ude/elastic-ai.creator


网站公告

今日签到

点亮在社区的每一天
去签到