SASA is a scalable and automatic stencil acceleration framework on modern HBM-based FPGAs. It automatically parses a stencil DSL, exploits the best hybrid spatial and temporal parallelism configuration on an HBM-based FPGA, and generates the optimal FPGA design in Vitis HLS with TAPA/AutoBridge-based floorplanning optimization. If you use SASA in your research, please cite our paper:
Xingyu Tian, Zhifan Ye, Alec Lu, Licheng Guo, Yuze Chi, and Zhenman Fang. 2022. SASA: A Scalable and Automatic Stencil Acceleration Framework for Optimized Hybrid Spatial and Temporal Parallelism on HBM-based FPGAs. Accepted by ACM Transactions on Reconfigurable Technology and Systems (TRETS 2023).
git clone https://github.com/SFU-HiAccel/SASA.git
- Evaluated hardware platforms:
- Host OS
- 64-bit Ubuntu 18.04.2 LTS
- Datacenter FPGA
- Xilinx Alveo U280 - HBM2-based FPGA
- Host OS
- Software tools:
- HLS tool:
- Vitis 2020.2, 2021.1 or 2021.2
- Xilinx Runtime (XRT) corresponding version with Vitis
- Python 3.6+
- TAPA
- HLS tool:
# Kernel name
kernel: JACOBI2D
# Required iteration
iteration: 4
# Input name and size
input float: in_1(9720, 1024)
# Stencil kernel pattern with relative coordinates
output float: out_1(0, 0) = ( in_1(0,1) + in_1(1,0) + in_1(0,0) + in_1(0,−1) + in_1(−1,0) ) / 5
# Optional parameters can be decided automatically or user can specify congfiguration
# Kernel number
count: 3
# PE number per kernel
repeat: 4
# Parallelism
boarder: streaming
SASA takes high-level DSL description as inputs, automatically explores the best spatial and temporal parallelism.
-
Generate stencil design with the best optimization:
- Run:
python3 exploration.py --src stencil.dsl
- Run:
-
Generate customized stencil design
- Generate the both host code and kenrel code in Vitis HLS
- Run:
python3 codgen.py --src stencil.dsl
- Run:
- Process HLS synthesis
- Run:
source generate_xo.sh
- Run:
- Generate bitstream
- Run:
source generate_bitstream.sh
- Run:
- Compile host code
- Run:
g++ -o stencil -O2 stencil.cpp host.cpp -ltapa -lfrt -lglog -lgflags -lOpenCL
- Run:
- Generate the both host code and kenrel code in Vitis HLS
-
Execute on hardware
- Run:
./stencil --bitstream=stencil.$platform.hw.xclbin
- E.g. $platform = xilinx_u280_xdma_201920_3
- Run:
- Xingyu Tian, PhD Student
- HiAccel Lab, Simon Fraser University (SFU)
- Supervisor: Dr. Zhenman Fang
- Email: [email protected]