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

Quartus Synthesis Flow Improvement #618

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

bo3z
Copy link
Contributor

@bo3z bo3z commented Jul 25, 2022

Description

📝 Improves the Quartus synthesis flow with more logging, storing resource usage and latency results to files and more robust compilation flags

Type of change

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

Tests

📝 A few models were synthesized, in order to verify more logging and the presence of files containing synthesis results.

  • 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 added tests that prove my fix is effective or that my feature works.

This PR attempts to do three things in the Quartus synthesis flow:

  1. Add a variable level of logging during HLS synthesis, which allows the user to see the exact stage of HLS synthesis, alongside any warnings, intermediate fails, reasons of failure etc.
  2. Write HLS synthesis results (resource usage and timing analysis) to a text file, so these can be reused later. Also, a common issue with Quartus synthesis is an exception encountered when reading verification results (latency and ii), which are obtained by running the binary produced by HLS synthesis. If i++ is not available on the host system natively (such as when it is installed in a container, e.g. singularity), running the binary from hls4ml will throw an exception after which the execution of the entire program halts, because verification results are not obtained. This PR addresses this problem by placing the verification inside a try-catch clause as well as providing clear instructions why an exception is encountered.
  3. Adds a flag to HLS synthesis to continue compiling if a large area is estimated. Sometimes, the HLS compiler overestimate the resources needed, and fails compilation. Therefore, we allow the compilation to continue (even if it can't fit on the desired FPGA) to perform some analysis. This is a configurable flag and not used by default.

@bo3z bo3z requested review from jmitrevs and vloncar July 25, 2022 15:52
@vloncar vloncar merged commit 5376181 into fastmachinelearning:main Aug 12, 2022
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