Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] use xnnpack quantization in eager/aoti #698
[DRAFT] use xnnpack quantization in eager/aoti #698
Changes from 7 commits
1cef4bf
5071bec
2d7c574
c9c1ceb
eeee411
3d70e5b
c13d409
3121d55
0b93db9
f9b4731
0ac35a0
0d759f0
cf8f910
4a7a40c
01ee9b4
92bc305
939e83c
70d6e59
c48abac
4108f46
19f0b6e
85829fa
1aa7bfb
9190974
7428eb8
2cb2107
806ae55
3dccf9f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@digantdesai I haven't split prepack/run separately because I first want to get the end-to-end flow working.
Let me know if something is obviously wrong in this function. Here is the output of running it on an example:
A couple bits I wasn't sure on and just picked the options that gave the best numeric results (but let me know if not correct):
I set input_channels for the operator to be the logical number of input channels (2 times the number of cols in kernel due to packing).
I set block_size equal to the group_size, but from https://fburl.com/z945pcpz, I first thought it was the number of groups per row because there is one scale per group.
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.
Looks reasonable.
input_channels = K, independent of packing of weights.
group_size = number of input channels per group.
num_of_scales = Output channels * (input_channels/group_size)
. fburl.com/z945pcpz seems wrong.Looks OK? esp we typically compare res1 and res3 but with some more q/dqs on activation side but this is decent.
res1 and res2 are off but we are comparing 4b vs f32 so, I don't think I did rigorous comparison like this so who knows.