-
Notifications
You must be signed in to change notification settings - Fork 169
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
[int8 woq] make the scale type the same as input for bf16 autocast #534
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/534
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ea32965 with merge base 5787e9e (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@jerryzh168 @jgong5 @leslie-fang-intel Please help review the PR, thanks! |
can you check the output_code diff for
int8_weight_only() )
|
Hi Jerry, I found no output_code diff and here is the output_code:
In addition, although the output_code can be printed, I encountered an error no matter this PR was applied or not.
|
@HDCharles @jerryzh168 Could you help review? Thanks. |
please make sure the test passes before landing |
7b92973
to
ea32965
Compare
the error might be the same one as #515, I'll see if I can repro as well next week |
Hi @jerryzh168, how could I re-trigger the CIs? |
looks like it requires approval, I just approved the CI to run |
Under bf16 autocast, input's type would convert from fp32 to bf16 because of torch.mm. However, scale's type is still fp32, so as the final output. To fix the issue, we make scale's type the same as the output of torch.mm, to get a bf16 scale.
FX graph before:
FX graph after: