Memory problems when synthesizing Conv1D models
@ejk43 We're trying to synthesize some larger Conv1D models in Vivado HLS 2017.2 and we're wondering if the problems we're seeing are just due to the memory available on our computer.
When we synthesize a very small Conv1D model, it works. Here's a keras-config.yml
KerasJson: example-keras-model-files/KERAS_conv1d_small.json
KerasH5: example-keras-model-files/KERAS_conv1d_small_weights.h5
OutputDir: my-hls-test
ProjectName: myproject
XilinxPart: xcku115-flvf1924-2-i
ClockPeriod: 5
IOType: io_parallel # options: io_serial/io_parallel
ReuseFactor: 1
DefaultPrecision: ap_fixed<16,6>
and the command to build it:
python keras-to-hls -c keras-config.yml
cd my-hls-test
vivado_hls -f build_prj.tcl
but when we run a larger model, e.g.
KerasJson: example-keras-model-files/KERAS_conv1d.json
KerasH5: example-keras-model-files/KERAS_conv1d_weights.h5
OutputDir: my-hls-test
We get the following error during csynth:
ERROR: [XFORM 203-504] Stop unrolling loop 'ConvOut' (/home/jduarte1/hls-fpga-machine-learning/nnet_utils/nnet_conv.h:79) in function 'nnet::conv_1d<ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, config2>' because it may cause large runtime and excessive memory usage due to increase in code size. Please avoid unrolling the loop or form sub-functions for code in the loop body.
ERROR: [HLS 200-70] Pre-synthesis failed.
Is this just a memory problem? Or can we solve this by changing our HLS code? What kind of computer are you using to synthesize and compile firmware?
Thanks!