Is it possible to speed up hls_model.build() in hls4ml? Vivado HLS seems to run single-threaded #1300
Replies: 1 comment
-
The Vivado tool itself can use multithreading to speed up certain processes in the implementation stages, but speeding up HLS synthesis is less straightforward. However, with the soon-to-be-merged PR #1174, hls4ml will provide a workaround by splitting the model into subgraphs and synthesizing them in parallel threads, which can reduce synthesis time. The PR also includes some documentation to help you get started with using this feature. That said, users should carefully verify functional equivalence (particularly for models that use streaming interfaces). To further reduce build times, you can also use simpler configurations (e.g., fewer precision bits, larger reuse factors, etc.). Running synthesis locally is usually faster than on a shared server (provided your machine has sufficient resources) as it avoids contention with other users for CPU, memory, and disk access. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm using hls4ml to convert a small TensorFlow model into Verilog to run on a ZedBoard (Zynq-7000, xc7z020clg484-1). Here's the issue I'm running into:
When I call hls_model.build(...) in my script, the process takes a very long time to complete. From what I can tell, Vivado HLS synthesis seems to run entirely on a single thread. This significantly slows down the build process, even for relatively small models.
Is there any way to speed this up? Specifically:
Can Vivado HLS be configured to use multiple threads?
Is there a way to pass flags (e.g., -threads) through hls4ml?
Are there best practices for reducing build time without sacrificing too much accuracy or performance?
Would increasing the reuse_factor help reduce synthesis time?
Is it better to run synthesis locally instead of on a shared server?
I’d appreciate any tips or experience from others who’ve managed to optimize build time when using hls4ml with Vivado.
Thanks!
— Dinali
Beta Was this translation helpful? Give feedback.
All reactions