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

Adding FP8 weight export #907

Merged
merged 46 commits into from
May 29, 2024
Merged

Adding FP8 weight export #907

merged 46 commits into from
May 29, 2024

Conversation

costigt-dev
Copy link
Collaborator

@costigt-dev costigt-dev commented Mar 15, 2024

Reason for this PR

To enable export of OCP FP8 weights to onnx.

Changes Made in this PR

Float specific export mixins and handlers created, changes made to retrieve exponent and mantissa bit widths etc.

Testing Summary

Tests still being written

Risk Highlight

  • This PR includes code from another work (please detail).
  • This PR contains API-breaking changes.
  • This PR depends on work in another PR (please provide links/details).
  • This PR introduces new dependencies (please detail).
  • There are coverage gaps not covered by tests.
  • Documentation updates required in subsequent PR.

Makes changes to FloatQuant and the proxy class of FloatWeightBase which might be used elsewhere

Uses OCP fp8 types in pytorch which only work with version 2.1 onwards so this functionality won't work for some pytorch versions still within our test suite.

Relies on: #919 and is using placeholder code at present.

Checklist

  • Code comments added to any hard-to-understand areas, if applicable.
  • Changes generate no new warnings.
  • Updated any relevant tests, if applicable.
  • No conflicts with destination dev branch.
  • I reviewed my own code changes.
  • Initial CI/CD passing.
  • 1+ reviews given, and any review issues addressed and approved.
  • Post-review full CI/CD passing.

Future Work

@Giuseppe5 Giuseppe5 changed the base branch from master to dev March 15, 2024 14:47
@Giuseppe5 Giuseppe5 mentioned this pull request Mar 25, 2024
10 tasks
@costigt-dev costigt-dev changed the title Feat/export fp8 Adding FP8 weight export Apr 8, 2024
@Giuseppe5 Giuseppe5 marked this pull request as ready for review April 11, 2024 12:55
@Giuseppe5 Giuseppe5 added the do not merge This should not be merged just yet label Apr 11, 2024
@costigt-dev costigt-dev requested review from Giuseppe5 and removed request for Giuseppe5 April 12, 2024 12:38
Copy link
Collaborator

@nickfraser nickfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

@Giuseppe5 Giuseppe5 requested a review from nickfraser May 29, 2024 07:55
@Giuseppe5 Giuseppe5 requested review from nickfraser and removed request for nickfraser May 29, 2024 10:31
@Giuseppe5 Giuseppe5 merged commit fc4162e into Xilinx:dev May 29, 2024
22 checks passed
Giuseppe5 pushed a commit to Giuseppe5/brevitas that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge This should not be merged just yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants