Unrolled implementation for latency dense/conv layers #1014
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement manually unrolled dense/conv layers for latency models. Switch to enable this optimization is not implemented.
Currently, by importing
import hls4ml.optimization.fused_dotp.optimizer_pass.vitis
, allDense
,Conv1/2D
are unrolled forvivado/vitis
backends.Breaking changes
As this feature also resides in
hls4ml/optimization
, the #768 at that path is moved to a subdirectory.hls4ml/optimization
tohls4ml/optimization/dsp_aware_pruning
.np_config.enable_numpy_behavior()
is removed as it silently changes tensorflow's global behavior which may cause issue in other codes (e.g.,a < b
, wherea, b
aretf.Tensor
s, may no longer work with that option (tested tf2.13).As a result, compatibility with #809 is to be checked.
Type of change
Tests
Pending, will be added to HGQ tests.
Checklist
pre-commit
on the files I edited or added.