Code Monkey home page Code Monkey logo

hisparse's Introduction

High-Performance Sparse Linear Algebra on HBM-Equipped FPGAs Using HLS: A Case Study on SpMV (HiSparse)

DOI

HiSparse is a high-performance accelerator for sparse-matrix vcetor multiplication (SpMV). Implemented on a multi-die HBM-equipped FPGA device, HiSparse achieves 237MHz and delivers promising speedup with increased bandwidth efficiency when compared to prior arts on CPUs, GPUs, and FPGAs.

For more information, please refer to our FPGA 2022 paper.

@article{du2022hisparse,
  title={{High-Performance Sparse Linear Algebra on HBM-Equipped FPGAs Using HLS: A Case Study on SpMV}},
  author={Du, Yixiao and Hu, Yuwei and Zhou, Zhongchun and Zhang, Zhiru},
  journal={{Int'l Symp. on Field-Programmable Gate Arrays (FPGA)}},
  year={2022}
}

Prerequisites

  • Platform: Xilinx Alveo U280
  • Toolchain: Xilinx Vitis 2020.2

To reproduce the results

1. Colne this repo and download the datasets

git clone https://github.com/cornell-zhang/HiSparse.git
cd datasets
source download.sh

You will find two directories: graph and pruned_nn containing the datasets used in our evaluation.

2. Install cnpy to load the datasets

Cnpy is a C++ library that enables reading .npy files in C++. It is open-sourced available here: https://github.com/rogersce/cnpy. Please follow the instructions in the cnpy repo to install it.

After installing cnpy, remember to setup the following variables to load this library:

export CNPY_INCLUDE=<the directory contains cnpy header (cnpy.h)>
export CNPY_LIB=<the directory contains cnpy library (libcnpy.so)>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CNPY_LIB

3. Set up Xilinx Vitis 2020.2

This step is defferent depending on the installation setup on your machine. However, to check whether you have correctly set it up, you can do

printenv VITIS

the path to the Vitis installation should appear if it's correctly set up.

4. Run the pre-complied bitstream

This repo has a pre-complied fixed-point bitstream: dempo_spmv.xclbin. You can directly run it using

cd sw
make demo

The benchmark results will be printed out as the program is running, in the format as:

{Preprocessing: 0.64566 s | SpMV: 0.77102 ms | 49.4087 GBPS | 12.9698 GOPS }

The numbers are: pre-processing time, SpMV run time, SpMV data throughput, SpMV operation throughput.

Note: data throughput = operation throughput / 2 * 8.

5. Build and run the design

cd sw
make benchmark IMPL=<fixed/float_pob/float_stall>

The IMPL option is used to switch between the fixed-point design, the floating-point deisgn using partial output buffers, and the floating-point design using stall + row interleaving.

hisparse's People

Contributors

yxd97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hisparse's Issues

Modification in Makefile of sw/ directory, for spmv-fp to work

Hello.
Thank you for your work. I would like to suggest a little change to your Makefile (located here).

For the implementations of floating-point spmv (float_pob, float_stall), you have to add -DFP_POB or -DFP_STALL accordingly to the CXXFLAGS, so that the compilation of host or benchmark completes succesfully.
These flags are already set here, but not visible in the previously referred "main" functions in sw/ directory.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.