-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Support fp8 output of _scaled_mm for CPU #153600
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153600
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d992029 with merge base 1a722f6 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
8876f82
to
75a6bba
Compare
ideep::tensor dst_scales_t = ideep::tensor(ideep::scale_t(1, output_scale)); | ||
args.insert({DNNL_ARG_ATTR_SCALES | DNNL_ARG_DST, dst_scales_t}); |
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.
Do we need to check output_scale != 1.0f
here?
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.
Ok, I will follow the output_scale in qconv and add the check here.
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.
Done.
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.
LGTM
This PR is to support fp8 output of torch._scaled_mm for CPU, and create related UTs with fp8 and bf16/fp16/fp32 output.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @gujinghui @PenghuiCheng @jianyuh @min-jean-cho @Guobing-Chen @Xia-Weiwen @snadampal