Skip to content

liwii/onnx-mlir-to-vitis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

onnx-mlir-to-vitis

Hardware Synthesis Compiler for Deep Neural Network. It converts MLIR code from onnx-mlir to C++ code that can be synthesized to RTL with Vitis HLS

Dependencies

Tutorial

Train your network with machine learning libraries, and export the result as ONNX.

python tutorial/mnist/mnist.py

Run onnx-mlir to emit MLIR representation of the network.

path/to/onnx-mlir --EmitMLIR tutorial/mnist/mnist.onnx

Run compiler.py to convert the MLIR code to C++ code synthesizable with Vitis HLS.

python compiler.py tutorial/mnist/mnist.onnx.mlir > tutorial/mnist/graph.cpp

Finally, run synthesis on Vitis HLS. This blog might be useful. (Written in Japanese)

Note

Currently, the compiler only supports networks with

  • softmax
  • relu
  • fully-connected

layers. It does not support batch-processing either, so you need to set single element as the input data for the network when you export ONNX network.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published