Skip to content

Commit

Permalink
Stage initial set of changes for the Catapult backend (fastmachinelea…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
5 people authored Apr 15, 2024
1 parent b4ba020 commit 2531afe
Show file tree
Hide file tree
Showing 109 changed files with 14,930 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[submodule "example-models"]
path = example-models
url = https://github.com/hls-fpga-machine-learning/example-models.git
[submodule "hls4ml/templates/catapult/ac_types"]
path = hls4ml/templates/catapult/ac_types
url = https://github.com/hlslibs/ac_types.git
[submodule "hls4ml/templates/catapult/ac_simutils"]
path = hls4ml/templates/catapult/ac_simutils
url = https://github.com/hlslibs/ac_simutils.git
[submodule "hls4ml/templates/catapult/ac_math"]
path = hls4ml/templates/catapult/ac_math
url = https://github.com/hlslibs/ac_math.git
3 changes: 3 additions & 0 deletions hls4ml/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
from hls4ml.backends.vivado_accelerator.vivado_accelerator_backend import VivadoAcceleratorBackend
from hls4ml.backends.vivado_accelerator.vivado_accelerator_config import VivadoAcceleratorConfig # noqa: F401

from hls4ml.backends.catapult.catapult_backend import CatapultBackend # isort: skip

from hls4ml.backends.vitis.vitis_backend import VitisBackend # isort: skip

register_backend('Vivado', VivadoBackend)
register_backend('VivadoAccelerator', VivadoAcceleratorBackend)
register_backend('Vitis', VitisBackend)
register_backend('Quartus', QuartusBackend)
register_backend('Catapult', CatapultBackend)
register_backend('SymbolicExpression', SymbolicExpressionBackend)
Empty file.
Loading

0 comments on commit 2531afe

Please sign in to comment.