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

Closed
wants to merge 15 commits into 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.

@jmitrevs jmitrevs added this to the v1.1.0 milestone Jul 15, 2024
@calad0i calad0i force-pushed the symbolic-codegen-pr branch 2 times, most recently from cfd4b60 to d7e6652 Compare July 22, 2024 06:40
@calad0i calad0i marked this pull request as draft July 31, 2024 06:06
@calad0i calad0i force-pushed the symbolic-codegen-pr branch from 379f68f to 3cf2f2f Compare August 28, 2024 00:32
@calad0i
Copy link
Contributor Author

calad0i commented Oct 8, 2024

Closing for deprecating algorithm. Will open another PR for the new one.

@calad0i calad0i closed this Oct 8, 2024
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.

2 participants