Skip to content

A genetic algorithm based optimizer for HLS directives DSE

License

Notifications You must be signed in to change notification settings

aferikoglou/GenHLSOptimizer

Repository files navigation

HLS Directives DSE based on Genetic Algorithms

In this project we created an optimizer able to automatically perform High-Level Synthesis directives Design Space Exploration leveraging genetic algorithms.

Supported HLS Directives:

  • Loop Pipeline
  • Loop Unroll
  • Array Partition

Optimizer Inputs:

  1. synthesizable C/C++ source code annotated with labels in each action point i.e. array, loop (1st action point will be annotated with label L1, 2nd with label L2 etc.)
  2. kernel_info.txt that provides a) the top level function name and b) information for each action point. For loop action points users have to provide the loop tripcount and for array action points users have to provide its name as well as the size of each array dimension.

Optimizer Outputs:

  1. the Pareto optimal kernel source codes
  2. info.csv that describes the Pareto optimal kernel source code tradeoffs
  3. a database with the examined directives configurations and their corresponding latencies and resources (BRAM%, DSP%, LUT% and FF%)
  4. APP_NAME.json that provides statistics for the database

In the dataset and databases directory sample inputs and outputs can be found.

Getting Started

These instructions will get you a copy of the project on your local machine.

Prerequisites

This project was tested on Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-122-generic x86_64) with Python 3.6.9 and Vitis 2021.1 suite installed.

In addition, the following libraries are needed:

which can be simply installed using the following command.

python3 -m pip install -r requirements.txt

Run

After downloading the software in the Prerequisites section you can clone this repository on your local machine.

Start the HLS directives Design Space Exploration

./exec.sh run APP_NAME EXTENSION

Example

./exec.sh run rodinia-knn-1-tiling .cpp

About

A genetic algorithm based optimizer for HLS directives DSE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages