Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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!

Contact: hls4ml.help@gmail.com

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 Vitis (after downloading and installing from here)

#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')

Release files for hls4ml 0.5.0b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hls4ml 0.5.0b0
File Size Uploaded
hls4ml-0.5.0b0.tar.gz 247.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hls4ml 0.5.0b0
File Interpreter ABI Platform
hls4ml-0.5.0b0-py3-none-any.whl Python 3 none any Details

Total release size: 500.9 kB

Release files / hls4ml-0.5.0b0.tar.gz

Download URL hls4ml-0.5.0b0.tar.gz
Size 247.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9274b55ba055542c83ad95dad71bc0c4c372a8d2b74f08fca1707fd5082b7479
BLAKE2b-256 checksum
How to use checksums
29f5c3ee8135950055548a441cee5627b63e652ad64c6a01c5c4c1b5652d2900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

Release files / hls4ml-0.5.0b0-py3-none-any.whl

Download URL hls4ml-0.5.0b0-py3-none-any.whl
Size 253.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b259f36192705a30e1e9919f07e9d8b214d603985a1e9f7daec4ac2d5976dea
BLAKE2b-256 checksum
How to use checksums
4dded70c4990fb6361f21d6239299b2534a54441fc6260ab7a78e12204cbe670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

Release history Release notifications | RSS feed

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

This release

0.5.0b0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page