GithubHelp home page GithubHelp logo

gwjm / harp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ucla-vast/harp

0.0 0.0 0.0 31.7 MB

ICCAD'23 Best Paper Award candidate: Robust GNN-based Representation Learning for HLS

License: BSD 3-Clause "New" or "Revised" License

Shell 0.11% Python 29.87% C 20.92% Makefile 5.08% LLVM 44.02%

harp's Introduction

HARP

Publication

About

This repo contains the codes for building HARP, an automated framework to be trained to act as the surrogate of the HLS tool. It can be used to expedite the design optimization process. The database used in this repo is built using the AMD/Xilinx HLS tools, but can be replaced by other databases.

HARP develops a GNN-based model and builds a hierarchical graph to tackle the long range of dependency in programs. It also decouples the representation of program and its transformations (i.e., pragmas), allowing the model to learn the individual impact of each of these components. These optimizations not only enhance the performance of the model and the design space exploration based on it but also improve the model’s transfer learning capability, enabling easier adaptation to new environments.

Content

  1. Requirements and Dependencies
  2. Project File Tree
  3. Running the Project

Requirements and Dependencies

Requirements

You can install the required packages for running this project using:

sudo apt-get install python3-venv
python3 -m venv venv
source venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt

Graph Generation

The graph generation requires LLVM. If you want to expand on the existing graphs, please consider installing it.

This project is built on LLVM 13 that can be installed by:

wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh <version number>

Database Generation

The initial database is generated by AutoDSE which is built on top of the Merlin Compiler. If you want to expand the database, please consider installing them.

For synthesizing the designs, three versions of the AMD/Xilinx HLS tools have been used, SDAccel 2018.3 (denoted with v18), Vitis 2020.2 (denoted with v20), and Vitis 2021.1 (denoted with v21).

Project File Tree

The project file structure is as below:

.
+-- dse_database          # database, graphs, codes to generate/analyze them
    +-- [machsuite/poly]  # the source code, ds config, and database for each of the benchmarks
    +-- generated_graphs  # the generated graphs for each of the kernels
    +-- merlin_prj        # the Merlin project to run each of the kernels
+-- models                # the best trained models along with the initial one-hot encoder
+-- src                   # the source codes for defining and training the model and running the DSE

Running the Project

The src/config.py contains all the tunable parameters of the project. The current configuration runs DSE using the trained models for v21 (Vitis 2021.1). If you want to change the modes of running, please edit this file.

After setting the configurations, run the following command to execute the project:

cd src
python3 -W ignore main.py

You can run the src/main.py for training, inference, and design space exploration based on the parameters in src/config.py. For generating the graph, run the following command:

cd dse_database
python3 -W ignore graph_gen.py 

Citation

If you find any of the ideas/codes useful for your research, please cite our paper:

@inproceedings{harp2023,
    title={Robust GNN-based Representation Learning for HLS},
    author={Sohrabizadeh, Atefeh and Bai, Yunsheng and Sun, Yizhou and Cong, Jason},
    booktitle={In Proceedings of the 42nd IEEE/ACM International Conference on Computer-Aided Design (ICCAD)},
    year={2023}
}

harp's People

Contributors

atefehsz avatar

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.