Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrolled implementation for latency dense/conv layers #1014

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

calad0i
Copy link
Contributor

@calad0i calad0i commented May 14, 2024

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, all Dense, Conv1/2D are unrolled for vivado/vitis backends.

Breaking changes

As this feature also resides in hls4ml/optimization, the #768 at that path is moved to a subdirectory.

  • Code added by hls4ml Optimization API [Part 1] #768 moved from hls4ml/optimization to hls4ml/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, where a, b are tf.Tensors, may no longer work with that option (tested tf2.13).

As a result, compatibility with #809 is to be checked.

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Pending, will be added to HGQ tests.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant