mikeurbach / hot-chips-2022-pytorch-circt-hls-demo

Demo of PyTorch to Verilog with Torch-MLIR, MLIR, and CIRCT for Hot Chips 2022.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install Torch and Torch-MLIR.

python -m venv .venv

source .venv/bin/activate

pip install https://github.com/llvm/torch-mlir/releases/download/snapshot-20220816.566/torch-1.13.0.dev20220816+cpu-cp38-cp38-linux_x86_64.whl \
    https://github.com/llvm/torch-mlir/releases/download/snapshot-20220816.566/torch_mlir-20220816.566-cp38-cp38-linux_x86_64.whl \
    pybind11

Install MLIR, CIRCT, CIRCT-HLS, and Polygeist.

Follow the instructions on their respective websites.

Set relevant environment variables to point to the build directories.

export MLIR_BUILD=...
export CIRCT_SRC=...
export CIRCT_BUILD=...
export CIRCT_HLS_BUILD=...
export POLYGEIST_BUILD=

Run the demo script.

./demo.sh

About

Demo of PyTorch to Verilog with Torch-MLIR, MLIR, and CIRCT for Hot Chips 2022.


Languages

Language:MLIR 81.3%Language:Python 10.2%Language:Shell 5.4%Language:C++ 1.8%Language:Dockerfile 1.3%