Vitis Unified Backend - #1376
Conversation
…i wrapper for vitisUnified partial backend and build the skeleton code for other generation section
…nd-clock Fix vitis unified buffer depths and clock
30bf146 to
7487469
Compare
[TODO] Add multi-port for AXI-master driver
|
Thanks @Tanawin1701d The main outstanding issues are the documentation and the CI tests. The documentation could be added as a new section in this file https://github.com/fastmachinelearning/hls4ml/blob/main/docs/backend/accelerator.rst and can follow along the lines of the other accelerator backends. For the CI, having something that runs synthesis as it is done now requires some modifications away from the hard-coded Vitisi HLS locations that are currently used and that result in those tests failing when run as part of the hls4ml CI. Synthesis as part of pytests was developed by @marco66colombo, so maybe he can help with suggesting the necessary changes. |
|
I have prepared some initial fixes that work localy but also plan to run them through the gitlab pipeline at CERN. I didnt have enough time to do the last yet. They fixes remove the hardcoded synthesis requirements and add a v++ command that required to run the Vitis Unified workflow. But i kept the full bitstream generation out of the CI for now. I will try to have them run today or tomorrow and prepare a PR. But let me know if you have any thoughts about the "full bitstream generation out of the CI" part. @Tanawin1701d could you take a look at the documentation ? I think you have a lot of material for it and you are the best to write the final version. |
|
@gflengas Thanks, that sounds very good! I agree that we probably don't need to exercise the full bitstream generation in the CI, AFAIK we don't do it for the other accelerator backends. |
|
PR with the tests fix is up. CERN GitLab CI could not start the jobs because of runner-side registry and disk-space issues, rather than a test failure. I therefore reproduced the CI setup locally using the exact CERN CI image. The Vitis Unified suite passed with 10 passed and 2 intentionally skipped bitstream tests, covering both AXI-stream and AXI-master paths. Final step should be triggering the pipeline from here once merged |
- one CMA buffer + pointer register per model I/O port (kv260/zcu102)
single-port API
- forward dtbo/download/ignore_version/device (both AXI-stream and AXI-mastesr)
- add test_gen_unified_multi_io (2-in/2-out build, per-port driver checks)
- tested on KV260
Thanks, I will look into the document. |
|
Thanks! @Tanawin1701d! if you could also merge Tanawin1701d#5 quickly that would be great so we can exercise the fixed tests here. |
fix: run Vitis Unified synthesis tests in CI
|
@gflengas Thank you very much for the CI fix. I am going to look into the document. |
|
New PR that fixes this Tanawin1701d#6 . The way I was calling v++ and vitis-run was incomplete, and the tools could not access the correct project folder structure from inside the Apptainer container. Also, Tanawin added another test that generates a bitstream, so I will apply the same conditional skip that I previously added to the other bitstream-generation tests. |
Fix vitis unified ci project bind
|
@JanFSchulte I’ve added the documentation for the VitisUnified backend. What do you think? Currently, the links for the tutorial and custom platform setup point to my repository. I’m not sure whether they should be moved somewhere more official. Please let me know if there are any fixes we still need to make at this point. |
|
Hi @Tanawin1701d Docs look good to me. Tutorials can be migrated to https://github.com/fastmachinelearning/hls4ml-tutorial, I think it would be better to have them maintained under the official FastML umbrella. |
…nified documentation
|
Hi @JanFSchulte, I’ve updated the path in the documentation to point to the tutorial repository, and I’ve also created a pull request for the tutorial . I would appreciate it if you could take a look at PR #130 when you have a chance. Thanks |

Description
VitisUnified backend
Motivation
Summarized features
/tools/Xilinx/Vitis/2023.2/base_platformshttps://github.com/Xilinx/Vitis-Tutorials/tree/2025.1/Vitis_Platform_Creation/Design_Tutorials/01-Edge-KV260Type of change
For a new feature or function, please create an issue first to discuss it
with us before submitting a pull request.
Note: Please delete options that are not relevant.
Tests
test/pytest/test_backend/vitis_unified.pywith 4 main aspectbridge test
VitisUnifiedwithVitiscosimulation
fifo test optimization
hardware test
test_gen_unifiedintest reproduce
test/pytest/test_backend/vitis_unified.pyfiletest_gen_unified), you should specify XPFM_PATH(path to xpfm file) to the correct place.LOG_STD == True, HLS4ML will give the HLS+linker compiling message @ console.<output_project_dir>/<prefix>_err.logor<output_project_dir>/<prefix>_out.logTest Configuration:
Checklist
pre-commiton the files I edited or added.implementation detail
file generation(HLS4ML generated file) prepare file for system Generation and pynq driversynthesis Kernel(Synthesis Kernel (v++)) do c-synthesis for HLS4ML modellinker(Linker+vivado+Bitfile+hwh)File structure
template structure
hls4ml/templates/vitis_unifiedoutput file structure
configuration
input_typeandoutput_typeare support only float and double. And it must be match{in/out}_stream_buf_sizeunit is in amount elements of thennet::arrayxpfmPath
note to developer
unifiedWorkspace. The IDE will automatically detect your projectinput_type/output_typewas set totype x(double or float), you cannot predict with numpy array with different input/output typedepthargument @axi_master write@<project_name>_dm.cppmust be match of the array size generated the output array@ ````myproject_test.cpp``` for cosim and csim.<project_folder>/unifiedWorkspace/linker/_x/link/vivado/vpl/prjnote to tutorial
https://github.com/Tanawin1701d/vitisUnifiedTutorialgenerated warning
unused parameter,deprecated pragma,dataflow conflict