-
Notifications
You must be signed in to change notification settings - Fork 448
Vitis Accelerator IP Flow #1134
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
base: main
Are you sure you want to change the base?
Vitis Accelerator IP Flow #1134
Conversation
…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)
|
||
class VitisAcceleratorIPFlowBackend(VitisBackend): | ||
def __init__(self): | ||
super(VivadoBackend, self).__init__(name='VitisAcceleratorIPFlow') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why calling super(VivadoBackend, self)
and not super(VitisBackend, self)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not work cause VitisBackend
already sets the name
. I could find a workaround
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a result of the strange inheritance structure that we have. We will try to rationalize it in the future, so hopefully this can be updated then. But for now, given the mess our inheritance structure is, I think whatever works is fine.
hls4ml/backends/vitis_accelerator_ip_flow/vitis_accelerator_ip_flow_backend.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep FIFO depth optimisation for VitisAccelerator as a separate PR
apply_bd_automation -rule xilinx.com:bd_rule:axi4 -config { Clk_master {Auto} Clk_slave {Auto} Clk_xbar {Auto} Master {/axi_dma_0/M_AXI_S2MM} Slave {/processing_system7_0/S_AXI_HP2} ddr_seg {Auto} intc_ip {New AXI Interconnect} master_apm {0}} [get_bd_intf_pins processing_system7_0/S_AXI_HP2] | ||
apply_bd_automation -rule xilinx.com:bd_rule:clkrst -config { Clk {/processing_system7_0/FCLK_CLK0 (50 MHz)} Freq {100} Ref_Clk0 {} Ref_Clk1 {} Ref_Clk2 {}} [get_bd_pins myproject_axi_0/ap_clk] | ||
endgroup | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to add group_bd_cells hier_0 [get_bd_cells axi_dma_0] [get_bd_cells ${project_name}_axi_0]
here because axi_stream_driver.py
expect an IP hierarchy hier_0
.
Vitis Accelerator based on the IP Flow for Zynq devices (in contrast to #991 ), similar to the Vivado Accelerator.
Tested on
io_stream
andio_parallel
with a small MLPTo dos:
Type of change
Tests
Pending unit tests
Test Configuration:
Checklist
ap_axi_sdata.h
pre-commit
on the files I edited or added.