FracBNN icon indicating copy to clipboard operation
FracBNN copied to clipboard

Question about C-Sim simulation results

Open nguyendaithien opened this issue 11 months ago • 2 comments

First I would like to thank you for this open source code. I ran the C-Sim simulation using your code and the software and hardware results were both 0. Can you explain this reason? image

nguyendaithien avatar Mar 17 '24 16:03 nguyendaithien

Hi,

Thank you for checking out our FracBNN code. To reproduce the results, I would suggest making sure the software version matches. We used Vivado 2019.2 to synthesize the design when open sourcing the code. The more recent Vitis HLS introduced many changes to its API and compilation flow. We haven't yet tested our design on the latest version. Therefore, we suggest using Vivado HLS instead of the Vitis one.

Best, Yichi

ychzhang avatar Mar 17 '24 21:03 ychzhang

Thank you very much for the response, and I have another question.

In conv_weights.h, you said kernel weights of convolution are quantized to 0/1 and packed into hex number (presented by unit64 type). Also you pad 0s if the number of input channels is less than 64, which I understand.

But there is one problem that I'm not sure is which order of bits that you use to pack the bits to represent. For example, in (https://github.com/cornell-zhang/FracBNN/blob/main/xcel-cifar10/source/conv_weights.h#L4) how do you pack which bits (from which channels) to get the value 0xfb2d94df00000000 ?

Hope you respond, Luu

nguyendaithien avatar Mar 18 '24 06:03 nguyendaithien