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

Vitis Accelerator IP Flow #1134

Draft
wants to merge 90 commits into
base: main
Choose a base branch
from

Conversation

steltze
Copy link

@steltze steltze commented Nov 20, 2024

WIP. Opening for feedback.

Vitis Accelerator based on the IP Flow for Zynq devices (in contrast to #991 ), similar to the Vivado Accelerator.

  • Inherits from the Vitis backend
  • Generates the AXI wrapper around the typical hls4ml IP and the test bench
  • Automatically creates a Vivado project with the block design, imports the IP, and generates the bitstream

Tested on

  • Vivado and Vitis HLS v2023.2
  • ZCU102 (pynq v3 ported on an ubuntu image) and PYNQ-Z2 (official v3.0.1 image) using AXI-Stream and io_stream and io_parallel with a small MLP
  • Tested the Vivado/VivadoAccelerator backends as well to check that nothing broke

To dos:

  • Integrate AXI-Master interface as an option
  • Include tar generation with the bitstream, design files for pynq and the python driver for pynq
  • Include FIFO Depth Optimization as a backend pass (similar to FIFO depth optimizer for Vitis backend #1037 )

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Pending unit tests

Test Configuration:

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings. Some warnings occur due to ap_axi_sdata.h
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

steltze and others added 30 commits April 19, 2024 10:31
…rning#956)

* Stage initial set of changes for the Catapult backend

* applied some changes for issues reported by pre-commit. But pre-commit still reorders backends/__init__.py incorrectly

* final changes for clean pre-commit

* minor edits

* Checkin

* Add file

* pre-commit format

* add in nnet_utils files

* format changes for pre-commit

* run flows by netlist type

* update design pragmas on some blocks. cleaned up TCL script

* move AC submodules under hls4ml/templates/catapult

* merged in latest changes from mainline

* remove bad submodules

* recreate AC submodules in hls4ml/templates/catapult

* pre-commit fixes

* pre-commit fixes

* turn on Catapult backend testing

* removed io_parallel testing for Catapult backend

* add Catapult

* added Catapult

* added Catapult

* added Catapult to some pytests

* Added concept of ProjectDir to distinguish the project directory of the HLS tool from the ProjectName which is used for the cpp file and top function name

* better handling of c++ testbench data files. enhanced directory naming.

* fix syntax

* workaround from Giuseppe

* Add concept of ProjectDir for Catapult which is different from ProjectName that gets used for the top function name and the cpp files

* add new file from Giuseppe

* improvements to project management, reporting and testbench

* include new file in generation of parameters.h

* add hard_tanh for io_parallel. formatting

* Full path to the header nnet_helpers.h is necessary in the include (check if this is not an issue with recent versions of Catapult)

* Avoid ceiling function from the math library: ceil(n/d) ---> (n+d-1)/n

* These are mostly workarounds for the BUP synyhesis of a testing model (should these changes make in something more general?)

* revert format back to what clang-format currently enforces

* simplification from Giuesspe

* Fixes for bottom-up handling of libraries

* pre-commit format fixes

* fix loops

* consolidate prj scripts

* cleanup pragmas

* switch from using ssh to https for submodules

* fix include path for non-catapult install

* update pytest environment

* CL 1100381

* CL 1098112

* roll in latest changes. turn off Catapult variants of test_binary_cnn and test_cnn_mnist_qkeras for now

* fix test failure

* disable Catapult test for pytorch until it is supported

* disable Catapult for pytorch tests

* Simpler submodule initialization for CI

---------

Co-authored-by: David Burnette <[email protected]>
Co-authored-by: Giuseppe Di Guglielmo <[email protected]>
Co-authored-by: Jovan Mitrevski <[email protected]>
Co-authored-by: Vladimir Loncar <[email protected]>
updates:
- [github.com/psf/black: 24.3.0 → 24.4.0](psf/black@24.3.0...24.4.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this modification shouldn't be part of this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly, I think this modification shouldn't be part of this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants