Skip to content

PQuant🌶️ integration #1362

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

enlupi
Copy link
Contributor

@enlupi enlupi commented Aug 14, 2025

Description

This draft PR is intended to start a discussion on how to best integrate the PQuant🌶️ library with hls4ml.
The current state of the PR supports layers pruned and quantized using fixed quantizers. Support for high granularity quantization is still in development.

⚠️⚠️ In order for the PQuant layers to be parsed correctly, the code expects the user to run some custom functions that add the quantization parameters as layer attributes (see the test file for examples). In the future these functions should be added to PQuant🌶️. ⚠️⚠️

Type of change

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

Tests

Unit test test/pytest/test_pquant.py was added to test correct parsing of the pruned/quantized layers and that the precision is set correctly.
⚠️⚠️ THE TEST IS CURRENTLY BROKEN! The file needs to be split into two, to test PyTorch and Keras frontend separately ⚠️⚠️

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.

1 participant