Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing support for Alveo boards #552

Merged
merged 21 commits into from
Jun 20, 2022

Conversation

selwyn96
Copy link
Contributor

This PR provides backend support for Alveo boards (U50, U200, U250 and U280) by leveraging the VivadoAccelerator backend.
Reference: #496.

Changes:

In hls4ml/templates/vivado_accelerator/alveo
Added RTL files which act as AXI stream to AXI master adapter for the Alveo boards.
The axi-stream tcl scripts for all boards.
The python drivers.

In /hls4ml/backends/vivado_accelerator/vivado_accelerator_backend.py
Added a make_xclbin function that generates the xclbin container by linking the project and object files.

Tests

Modified the test/hls4ml-keras-test.sh script to test the functionality of the branch.
A more comprehensive tutorial for training and deploying on the Alveo boards can be found at https://github.com/selwyn96/Alveo-tutorial

Slides

(https://docs.google.com/presentation/d/1D9tryRyFp6kSb2ytc8kBLJ-El4CB_giDGnOQ2lFuLzs/edit?usp=sharing)

@thesps
Copy link
Contributor

thesps commented May 18, 2022

Thanks a lot for this! And thanks @Gabriele-bot for getting it rolling. I did a build today with the QKeras jet tagging example model targeting my U200, and it worked, which is awesome!
I have one general question: did you try to create an AXI master interface in HLS and skip the master-to-stream RTL? It's great that it works as is, but it would still be nice if we could simplify things.

I'll leave some more detailed review comments inline in the code.

Copy link
Contributor

@thesps thesps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

axi_stream_design.tcl: now there are 4 copies of basically the same file, differing only by the device part (as far as I can tell). Can we reduce that to one copy with a paremeter? It will be better for maintenance. We could write the part into the project.tcl, for example. For the Python driver there's already just a single file.

hls4ml/__init__.py Outdated Show resolved Hide resolved
hls4ml/backends/vivado_accelerator/supported_boards.json Outdated Show resolved Hide resolved
hls4ml/writer/vivado_accelerator_writer.py Outdated Show resolved Hide resolved
scripts/hls4ml Outdated Show resolved Hide resolved
test/keras-models.txt Outdated Show resolved Hide resolved
test/keras-models.txt Outdated Show resolved Hide resolved
@jmduarte jmduarte linked an issue May 18, 2022 that may be closed by this pull request
@selwyn96
Copy link
Contributor Author

selwyn96 commented May 18, 2022

@thesps Thanks a lot for the detailed suggestions.
Regarding your general question: I have not been able to make much progress in moving the AXI master interface to hls. I'm still looking into it and will make an update if there's any progress.

@selwyn96 selwyn96 requested a review from thesps June 3, 2022 22:50
@selwyn96 selwyn96 requested a review from thesps June 20, 2022 05:17
Copy link
Contributor

@thesps thesps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, looks very nice now

@thesps thesps merged commit aa7ce78 into fastmachinelearning:master Jun 20, 2022
calad0i pushed a commit to calad0i/hls4ml that referenced this pull request Jul 1, 2023
Providing support for Alveo boards (fastmachinelearning#552)

Co-authored-by: Sioni Summers <[email protected]>
Co-authored-by: Gabriele-bot <[email protected]>
Co-authored-by: Selwyn96 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alveo-Pynq implementation
4 participants