POM is an end-to-end optimizing framework on MLIR for efficient FPGA-based accelerator generation. POM has the following technical contributions:
- Programmability: POM provides a decoupled DSL that enables concise descriptions of functions, loops, and arrays. A rich collection of scheduling primitives is provided for flexible customization, leading to much fewer lines of code while maintaining high performance.
- Extensibility: POM explicitly introduces three layers of IR to perform operations at suitable abstraction levels in a unified framework, streamlining the implementation and debugging process and reducing the effort of supporting various optimization methods.
- Quality: POM provides a rich set of optimization methods and performs FPGA-oriented schedule operations at proper levels, relieving tight loop-carried dependence, exploiting parallelism, and improving overall performance.
- Automation: POM contains a design space exploration (DSE) engine to search for high-performance schedule schemes automatically and efficiently, while also allowing designers to set user-specified schedules.
Please refer to our HPCA' 24 paper for more details:
@inproceedings{zhanghpca2024pom,
title={An Optimizing Framework on MLIR for Efficient FPGA-based Accelerator Generation},
author={Weichuang Zhang and Jieru Zhao and Guan Shen and Quan Chen and Chen Chen and Minyi Guo},
booktitle={2024 IEEE International Symposium on High-Performance Computer Architecture (HPCA)},
year={2024}
}
git clone git://repo.or.cz/isl.git
cd isl
git pull
git submodule init
git submodule update
./autogen.sh
./configure --with-int=imath
make
make check
make install
More details of isl installation: https://compsys-tools.ens-lyon.fr/iscc/isl.pdf
git clone --recursive git@github.com:sjtu-zhao-lab/pom.git
cd pom
pom/
├── scalehls/
│ ├── polygeist /
│ │ ├── llvm-project/
# Go to scalehls/
./build-scalehls.sh
# Go to pom/
./build-pom.sh
# Go to pom/build/
cmake --build . --target gemm
You can run the following instruction to generate an optimized MLIR affine dialect:
./bin/gemm
The optimized IR is stored at pom/samples/gemm/test_gemm_4096.mlir .
You can further translate the optimized IR into HLS C code with the following instruction:
../scalehls/build/bin/scalehls-opt ../samples/gemm/test_gemm_4096.mlir\
--scalehls-func-preprocess="top-func=gemm" \
--scalehls-qor-estimation="target-spec=../samples/config.json" \
| ../scalehls/build/bin/scalehls-translate -emit-hlscpp > ../samples/gemm/test_gemm_4096.cpp
include
andlib
: Compiler implementationscalehls
: the HLS C code generationtestbench
: Kernels and applications described with POM DSLsamples
: The generated designs