-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from hls-fpga-machine-learning/pypi
Update for PyPI
- Loading branch information
Showing
59 changed files
with
163 additions
and
3,803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 📦 Packaging release to PyPI | ||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
release: | ||
name: Upload new release to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
- name: Install dependencies | ||
run: python3 -m pip install --user --upgrade setuptools wheel | ||
- name: Build package | ||
run: python3 setup.py sdist bdist_wheel | ||
- name: Publish 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "example-models"] | ||
path = example-models | ||
url = https://github.com/hls-fpga-machine-learning/example-models.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,57 @@ | ||
<img src="https://hls-fpga-machine-learning.github.io/hls4ml/img/logo.jpg" alt="hls4ml" width="400"> | ||
<p float="left"> | ||
<img src="https://hls-fpga-machine-learning.github.io/hls4ml/img/logo.jpg" alt="hls4ml" width="400"/> | ||
</p> | ||
|
||
[![DOI](https://zenodo.org/badge/108329371.svg)](https://zenodo.org/badge/latestdoi/108329371) | ||
[![PyPI version](https://badge.fury.io/py/hls4ml.svg)](https://badge.fury.io/py/hls4ml) | ||
[![Supported Python versions](https://img.shields.io/pypi/pyversions/hls4ml.svg)](https://pypi.org/project/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! | ||
|
||
contact: [email protected] | ||
**Contact:** [email protected] | ||
|
||
For more information visit the webpage: [https://hls-fpga-machine-learning.github.io/hls4ml/](https://hls-fpga-machine-learning.github.io/hls4ml/) | ||
# Documentation & Tutorial | ||
|
||
For more information visit the webpage: [https://fastmachinelearning.org/hls4ml/](https://fastmachinelearning.org/hls4ml/) | ||
|
||
Detailed tutorials on how to use `hls4ml`'s various functionalities can be found [here](https://github.com/thesps/hls4ml-tutorial). | ||
|
||
# Installation | ||
``` | ||
pip install hls4ml | ||
``` | ||
|
||
To install the extra dependencies for profiling: | ||
|
||
``` | ||
pip install hls4ml[profiling] | ||
``` | ||
|
||
# Getting Started | ||
### Creating an HLS project | ||
```Python | ||
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](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vitis.html)) | ||
|
||
```Python | ||
#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') | ||
``` |
Submodule example-models
added at
5f7c63
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.