Skip to content

Propagate zeros from Conv layers to multiplication config

Javier Duarte requested to merge github/fork/bo3z/propagate-conv-zeros into main

Created by: bo3z

Description

📝 Convolutional layers use Dense matrix multiplication at its core, but do not fully utilise the benefit of n_zeros in the Latency strategy of Dense layers.

  • When there are zeros, HLS can optimise the number of DSPs in Latency strategy, by using the resource pragma.
  • This is currently done for Dense layers and works quite well, even for RF != 1 (Tested as part of #768 )
  • However, n_zeros is always set to zero for Conv2D layers.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Tests

  • No new tests, the current PyTests should verify no changes in Conv implementations
  • I can add some results from my synthesis of #768 to verify changes are correct.

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

Merge request reports

Loading