flames

Flexible Linear Algebra with Matrix-Empowered Synthesis (for Vitis HLS)

https://github.com/autohdw/flames

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: ieee.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

cpp fpga high-level-synthesis hls linear-algebra vitis vitis-hls
Last synced: 6 months ago · JSON representation ·

Repository

Flexible Linear Algebra with Matrix-Empowered Synthesis (for Vitis HLS)

Basic Info
  • Host: GitHub
  • Owner: autohdw
  • License: apache-2.0
  • Language: C++
  • Default Branch: master
  • Homepage: https://flames.autohdw.com
  • Size: 646 KB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
cpp fpga high-level-synthesis hls linear-algebra vitis vitis-hls
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

FLAMES Library for Vitis HLS

Flexible Linear Algebra with Matrix-Empowered Synthesis (for Vitis HLS)

Developed by Wuqiong Zhao and other contributors, from LEADS, Southeast University. This is part of the AutoHDW project.

Key Features

  • Header-only Library (Super Easy to Install and Use)
  • Templated-based C++ Design:
    • Mat and Tensor Classes
    • MatRef and MatView for Reference and View
    • (Relatively) Modern C++ Implementation (C++14/17)
  • Hardware-friendly Design:
    • Optimized RAM Usage
    • Configurable Parallelism
    • Optimized Matrix Operations
  • Fully Open Source

Read our paper for details (open access PDF).

Example

Linear algebra algorithm implementation made easy by FLAMES! Here is the NSA algorithm and the corresponding implementation using FLAMES:

| Step | Algorithm | FLAMES C++ Implementation | | :--: | -------------------------------------------- | ---------------------------------- | | 1 | $\mathbf{D} = \mathbf{A} \circ \mathbf{I}$ | auto D = A.diagMat_(); | | 2 | $\mathbf{E} = \mathbf{A} - \mathbf{D}$ | auto E = A.offDiag_(); | | 3 | $\mathbf{D}I = \mathbf{D}^{-1}$ | `auto DI = D.inv();| | 4 | $\mathbf{P} = -\mathbf{D}_I \mathbf{E}$ |auto P = -DI * E;| | 5 | $\mathbf{X} = \mathbf{P}$ (Iter. 1) |auto X = P = P;| | 6 | $\text{for } i = 2, \dots, n$ |for (int i = 2; i <= n; ++i) {| | 7 | $\quad \mathbf{P}^i = \mathbf{P}^{i-1} \mathbf{P}$ | P_ *= P;| | 8 | $\quad \mathbf{X} = \mathbf{X} + \mathbf{P}^i$ | X += P;| | 9 | $\text{end}$ |}` | | 10 | $\mathbf{A}^{-1} = \mathbf{X} \mathbf{D}I + \mathbf{D}I$ | `Ainv = X * DI + DI;` |

From Table 2 in our paper, code available at examples/mat-inv-nsa.

Citation

If you find FLAMES useful, please cite our paper: Flexible High-Level Synthesis Library for Linear Transformations, IEEE TCAS-II, vol. 71, no. 7, pp. 3348-3352, Jul. 2024. [IEEE Xplore] [PDF] [DOI] bibtex @article{zhao2024flexible, title = {Flexible High-Level Synthesis Library for Linear Transformations}, author = {Zhao, Wuqiong and Li, Changhan and Ji, Zhenhao and Guo, Zhichen and Chen, Xuanbo and You, You and Huang, Yongming and You, Xiaohu and Zhang, Chuan}, journal = {{IEEE} Transactions on Circuits and Systems {II}: Express Briefs}, volume = {71}, number = {7}, pages = {3348--3352}, year = {2024}, month = jul, publisher = {IEEE} }

Supported Versions

Since FLAMES is a modern library written using C++14 (with some C++17 features), it only supports Vitis HLS 2020 or later where the GCC compiler version is 6.2.0. Notably, Vivado HLS is not supported.

Usage

FLAMES is a header-only library, so you can easily use it by first cloning it under you project root with shell git clone https://github.com/autohdw/flames.git

Core Modules

You can include the required header ```cpp

include "flames/core.hpp"

All classes and functions are under the `flames` namespace, so you can use cpp using namespace flames; `` to access classesMat, etc. directly instead offlames::Mat`.

Additional Insights

You can find more information about FLAMES in FLAMES_Insight.pdf.

License

The FLAMES is open source and distributed by an Apache license (v2.0). Please cite our paper if you use FLAMES in your research.

Owner

  • Name: Auto HDW
  • Login: autohdw
  • Kind: organization
  • Email: contact@autohdw.com

LEADS Auto Hardware

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you find FLAMES useful in your research, please cite it as below."
authors:
- family-names: Zhao
  given-names: Wuqiong
  orcid: https://orcid.org/0000-0002-9550-7423
- family-names: Li
  given-names: Changhan
- family-names: Ji 
  given-names: Zhenhao
- family-names: Guo
  given-names: Zhichen  
- family-names: Chen
  given-names: Xuanbo
- family-names: You
  given-names: You
- family-names: Huang
  given-names: Yongming
- family-names: You
  given-names: Xiaohu
- family-names: Zhang
  given-names: Chuan
title: FLAMES
version: 0.1.0
license: Apache-2.0
date-released: 2023-07-10
url: https://github.com/autohdw/flames
preferred-citation:
  type: article
  authors:
  - family-names: Zhao
    given-names: Wuqiong
    orcid: https://orcid.org/0000-0002-9550-7423
  - family-names: Li
    given-names: Changhan
  - family-names: Ji 
    given-names: Zhenhao
  - family-names: Guo
    given-names: Zhichen  
  - family-names: Chen
    given-names: Xuanbo
  - family-names: You
    given-names: You
  - family-names: Huang
    given-names: Yongming
  - family-names: You
    given-names: Xiaohu
  - family-names: Zhang
    given-names: Chuan
  title: Flexible High-Level Synthesis Library for Linear Transformations
  date-released: 2024-07-01
  doi: "10.1109/TCSII.2024.3366282"
  journal: "IEEE Transactions on Circuits and Systems II: Express Briefs"
  volume: 71
  issue: 7
  start: 3348
  end: 3352
  year: 2024

GitHub Events

Total
  • Watch event: 3
  • Push event: 4
Last Year
  • Watch event: 3
  • Push event: 4

Dependencies

.github/workflows/pages.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v2 composite
  • actions/upload-pages-artifact v2 composite