fastmachinelearning / hls4ml

Machine learning on FPGAs using HLS
https://fastmachinelearning.org/hls4ml
Apache License 2.0
1.3k stars 419 forks source link

Compile Error using Saturation mode Optimizer #545

Open selwyn96 opened 2 years ago

selwyn96 commented 2 years ago

Hi everyone, I am working on a branch to add Alveo support for hls4ml. I have my code up to date with the master branch and am currently running tests to make sure everything works fine. I am seeing a error when including the code hls4ml.model.optimizer.get_optimizer('output_rounding_saturation_mode').configure(layers=['Activation'], rounding_mode='AP_RND', saturation_mode='AP_SAT') when configuring my hls4ml model. This error appears during hls_model.compile() The error can be removed by adding hls4ml.model.optimizer.get_optimizer('output_rounding_saturation_mode').configure(layers=[]) before compile without compromising the accuracy. Why is this happening? error

BertSam commented 2 years ago

I have no idea, but I'm trying to compile for 1 day now and your workaround probably save me a lot of time !

Still a weird bug that would required to be fixed.