Skip to content
/ hls4ml Public

Machine learning in FPGAs using HLS

License

Notifications You must be signed in to change notification settings

therwig/hls4ml

Repository files navigation

hls4ml

A package for machine learning inference in FPGAs. We create firmware implementations of machine learning algorithms using high level synthesis language (HLS). We translate traditional open-source machine learning package models into HLS that can be configured for your use-case!

Master : https://github.com/hls-fpga-machine-learning/hls4ml

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Quartus Prime license: the package only supports Intel devices, a license is required for the simulation and synthesis of HLS code.

  • Tested on version 19.1

In addition the following dependencies are required:

Python 3

Instructions to run

Change directory to /keras-to-hls

python keras-to-hls.py -c keras-config.yml

Configuration

Configuration options for the HLS translation of Keras models.

KerasJson, KerasH5: For Keras translation, you are required to provide json and h5 model files.
Examples are in the directory: example-keras-model-files

OutputDir: Directory where your HLS project will go

DefaultPrecision: This is the default type of the weights, biases, accumulators, input and output vectors. This can then be further modified by the firmware/parameters.h file generated in your HLS project.

Note: The package optimizes for minimum latency. The Reuse factor support is being finalized will allow a better latency / area tradeoff.

Running HLS

cd my-hls-test
make myproject-fpga

Authors

  • Hamza Javed - Intel Optimization - CERN

See also the original contributors who participated in this project.

Acknowledgments

  • The amazing HLS4ML Team
  • My supervisors Maurizio, Vladimir and Jennifer

About

Machine learning in FPGAs using HLS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published