GithubHelp home page GithubHelp logo

danchitnis / lu-decomposition-fpga Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 7.78 MB

Acceleration of LU Decomposition on FPGAs

License: GNU Lesser General Public License v3.0

C++ 11.17% C 82.84% Makefile 5.99%

lu-decomposition-fpga's Introduction

Acceleration of LU Decomposition on FPGAs

Team Number: xohw22-006


Background

Simulation Program with Integrated Circuit Emphasis or SPICE has now been widely used in the IC design and verification. Solving of sparse matrices often takes up most of the SPICE simulation time. Lower–upper (LU) decomposition is the most commonly used method to solve matrices. It factorizes a matrix into two factors – a lower triangular matrix L and an upper triangular matrix U. In this way, we only need to solve triangular systems to get results. However, the sparse-matrix computation is hard to parallelize on regular processors due to the irregular structure of the matrices. Modern FPGAs, however, have the potential to compute these hard-to-parallelise problems more efficiently due to its flexible reconfigurability.

Team and Project Information

Experimental Results

Matrices used for test

Matrix Order NNZ Sparsity Pattern Symmetry Numeric Symmetry
rajat11 135 665 3.65% 89.10% 63%
rajat14 180 1475 4.55% 100% 2.50%
rajat05 301 1250 1.38% 77% 70.60%
oscil_dcop_01 430 1544 0.84% 97.60% 69.80%
fpga_dcop_01 1220 5892 0.40% 81.80% 27.30%

cpu CPU

fpga FPGA

For smaller matrices, FPGA tends to take longer time to solve per right hand side vectors than CPU. However, when the matrices becomes larger, FPGA tends to be faster than CPU, with a speedup of about 1.2.

File Organisation

  • Matrix_Sample/ Some matrices used for test.
  • myKLU/ Software version for KLU decomposition
  • Vitis/myKLU/host Host code for FPGA implementation
  • Vitis/myKLU/host Kernel code for FPGA implementation

Build

Board used: Alveo U280 Data Center Accelerator Card

Vitis Version: v2021.2

Instructions to build and test project

For the CPU version:

  • Step 1: Go to directory ./myKLU
  • Step 2: Check if clang is installed. If not, modify Makefile to use appropriate compiler. Typically GCC is acceptable.
  • Step 3: To make static library only, run make library
  • Step 4: To run software version of LU decomposition, run make klu_kernel. The default matrix file should be put in the same directory as the executable program.
  • Step 5: To benchmark it with matrices in directory ../Matrix_Sample, run make klu_bench

For the FPGA version:

  • Step 1: Import the project to Vitis 2021.2.
  • Step 2: Compile the CPU version above first, FPGA version requires the results from CPU version to verify that the results are correct.
  • Step 3: Check the host C/C++ build settings. Ensure the include and lib settings are correct. The include path should include the directory of ./myKLU/include and ./myKLU/myKLU of the Software version. The lib should include the path of ./myKLU/lib of the Software version and require the library libklu.a, libamd.a, libbtf.a, and libsuitesparseconfig.a.
  • Step 4: Build the project.

lu-decomposition-fpga's People

Contributors

danchitnis avatar psdzzm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shu-gu

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.