Long HLS synthesis time for FC layer with the folding of 1 #557
-
Hi, I'm a newcomer to FINN hardware generation. I had some experience in using FINN to transform and extract the parameters of binarized MLPs. I have recently started learning the end-2-end flow of the FINN framework. In my experiment, I attempt to create the hardware with a folding factor of 1 for a 1-bit precision FC layer with 128 neurons and 784-bit input (28*28 pixels from the binarized(bipolar) MNIST dataset). The FINN tool generates the HLS code of StreamingFCLayer_Batch_0 component with MW1=784, MH1=128, PE=128, SIMD=784. However, Vivado HLS seems taking forever synthesise the HLS project. I really appreciate insights into the cause of this long synthesis time and suggestions for improvements. Thanks! PS Here's the Vivado HLS log file attached |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, great to hear you're getting your hands dirty with FINN :) I could try my best to help you out with this. I suspect from the log file that you are using the MVAU with 'const' memory mode? Since the weights are binarized and since the weight matrix is not that long, I'm not entirely sure whether the following is applicable. But, it has been observed before that synthesizing the MVAU with the weights 'baked-in' results in long synthesis time (and consumes a lot of memory). See this page for more details: https://finn.readthedocs.io/en/latest/internals.html#streamingfclayer-mem-mode You could try to set the I hope this resolves your issue! |
Beta Was this translation helpful? Give feedback.
Hi, great to hear you're getting your hands dirty with FINN :)
I could try my best to help you out with this. I suspect from the log file that you are using the MVAU with 'const' memory mode? Since the weights are binarized and since the weight matrix is not that long, I'm not entirely sure whether the following is applicable. But, it has been observed before that synthesizing the MVAU with the weights 'baked-in' results in long synthesis time (and consumes a lot of memory). See this page for more details: https://finn.readthedocs.io/en/latest/internals.html#streamingfclayer-mem-mode
You could try to set the
mem_mode
todecoupled
for the MVAU:finn/src/finn/custom_op/fpgadataflow/strea…