Code Monkey home page Code Monkey logo

hls4ml's Introduction

hls4ml

DOI PyPI version Supported Python versions

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!

If you have any questions, comments, or ideas regarding hls4ml or just want to show us how you use hls4ml, don't hesitate to reach us through the discussions tab.

Documentation & Tutorial

For more information visit the webpage: https://fastmachinelearning.org/hls4ml/

Detailed tutorials on how to use hls4ml's various functionalities can be found here.

Installation

pip install hls4ml

To install the extra dependencies for profiling:

pip install hls4ml[profiling]

Getting Started

Creating an HLS project

import hls4ml

#Fetch a keras model from our example repository
#This will download our example model to your working directory and return an example configuration file
config = hls4ml.utils.fetch_example_model('KERAS_3layer.json')

print(config) #You can print the configuration to see some default parameters

#Convert it to a hls project
hls_model = hls4ml.converters.keras_to_hls(config)

# Print full list of example models if you want to explore more
hls4ml.utils.fetch_example_list()

Building a project with Xilinx Vivado HLS (after downloading and installing from here)

Note: Vitis HLS is not yet supported. Vivado HLS versions between 2018.2 and 2020.1 are recommended.

#Use Vivado HLS to synthesize the model
#This might take several minutes
hls_model.build()

#Print out the report if you want
hls4ml.report.read_vivado_report('my-hls-test')

hls4ml's People

Contributors

vloncar avatar thesps avatar jmduarte avatar nhanvtran avatar benjaminkreis avatar bo3z avatar nghielme avatar jngadiub avatar jmitrevs avatar duchstf avatar drankincms avatar hamzajaved780 avatar ejk43 avatar keb-l avatar adrianalan avatar yiiyama avatar ngpaladi avatar d-gol avatar delonshen avatar zhenbinwu avatar pitmonticone avatar jochist avatar melko avatar veyron8800 avatar nemerchiedde avatar calad0i avatar selwyn96 avatar guyzsarun avatar pzejdl avatar maksgraczyk 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.