partitioned elements number (10000) has exeeded the threshold (4096) - using HLS4ML_tutorial #858
Replies: 2 comments 2 replies
-
The reason for this error is that the number of elements in a (sub)array stored in registers exceeds 4,096. This typically happens in Looking at the logs, there is an error in The reason for this is the way the strategy is set. In hls4ml, the config must be modified before writing and compiling the model, as the config is used to write all the C++ header files. To verify this, have a look at To fix this, update the config dictionary before calling convert, with the following line: (As far as I am aware) The |
Beta Was this translation helpful? Give feedback.
-
Thank you kindly for the feedback. I understand the problem better. I note the correct method of modifying the config correctly by the mentioned above. I was unaware that the compiling had to be done again and that the .yaml file is for completeness as opposed to modifying for the compiling/building. I have subsequently made the following changes:
I do take note that the latest I am not sure as to why the intended changes are not being implemented by the above attempts. In my own created test network, I modified the At least my own network has managed to build further than possible before which is great. Again, I greatly appreciate your time and any feedback on this. |
Beta Was this translation helpful? Give feedback.
-
Good day, all,
I am new to hls4ml, so please excuse my lack of knowledge. I have read almost any discussion and forum I can find on this problem and this is my last resort.
I have successfully tested very small autoencoder networks (synthesis and building in Vivado), however, I run into problems when implementing anything of a larger size. To see if the problem was on my side, I downloaded and ran the docker (with Vivado) as per the tutorial and cloned the stipulated repository by git clone https://github.com/fastmachinelearning/hls4ml-tutorial. The version of hls4ml used is 0.7.1.
I used the following test model KERAS_dense_16x100x100x100x100x100x5.json, and ran the following in Jupyter Notebook:
I then modified the hls4ml_config.yml (and part number in project.tcl) file as per the below by modifying the strategy, the IOtype to both stream and parallel, and the reuse factor to 2000, additionally i changed the FPGA part number to one installed):
as well as:
following this, building the project results in the following errors in all cases:
hls_model.build()
The same also happens when I use the tutorial examples and manually increase the network size.
Thank you for any assistance in advance.
Stefan
Beta Was this translation helpful? Give feedback.
All reactions