fastmachinelearning / hls4ml

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

hls4ml Optimization API [Part 2] #809

Open bo3z opened 1 year ago

bo3z commented 1 year ago

Description

  • Second part of hls4ml Optimization API #768
  • Introduces Dense Unrolled layers, optimising multiplications with zero in Resource strategy with RF > 1
  • Introduces additional TCL scripts, to optimise zero BRAM blocks.

Type of change

Tests

  • Added a new test, test_dense_unrolled that verifies dense resource layers implement avoiding zero multiplications are correct
  • Comparison with "standard" Dense Resource will be shortly available in the (updated) PR #768.

Checklist

bo3z commented 1 year ago

I will add pre-commit additionally, last time I ran it, some tests were broken, so will add it a subsequent commit.

bo3z commented 1 year ago

This is ready for review, seems that pre-commit can re-arrange the order of includes in C++ header files and it could cause compilation error.

jmitrevs commented 5 months ago

We merged part 1. Should we merge part 2?

vloncar commented 5 months ago

I'm reviewing it. Slowly :smiley: . But it's next in line, then HGQ.

jmitrevs commented 2 months ago

The pytest error is unrelated to the PR so from my side this can be merged. I'll let Vladimir give the last OK.