-
Notifications
You must be signed in to change notification settings - Fork 756
serialize scales as bf16 and serialize in Named Data Map #11031
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,8 @@ table Buffer { | |
| table PerChannelQuant { | ||
| scale:[float]; | ||
| channel_dim:int; | ||
| scale_buffer_idx: uint; | ||
| num_scales: uint; | ||
| } | ||
|
|
||
| table PerTokenDynamicQuant { | ||
|
|
@@ -63,7 +65,9 @@ table PerChannelGroupQuant { | |
| scale:[float]; | ||
| channel_dim:int; | ||
| group_size:int; | ||
| scale_bf16:[ushort]; | ||
| scale_bf16:[ushort] (deprecated); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious, why mark this as deprecated but not float if we are moving to ndm for evreythig?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because this actually was never used, since we never added the export path to serialize into this field. scale[float] is still used by older versions |
||
| scale_buffer_idx: uint; | ||
| num_scales: uint; | ||
| } | ||
|
|
||
| table XNNTensorValue { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a flag (default=bf16), which lines up with QB4W xnnpack flag to use bf16. We can error out at AoT for fp32 given we can't run that yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what you mean, won't almost all scales that come to use be fp32?