[inductor] enable bf32 for mkldnn linear pointwise/binary in inductor#127294
[inductor] enable bf32 for mkldnn linear pointwise/binary in inductor#127294zhuhaozhe wants to merge 72 commits intogh/zhuhaozhe/33/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/127294
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (7 Unrelated Failures)As of commit 63915d3 with merge base 2022588 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| if not hasattr(add_node.args[1], "meta"): | ||
| # May add an "int" | ||
| # We meet this issue while enabling bf32 for test_linear_unary | ||
| # the hardsimoid case will add "3" here and cannot check meta | ||
| # TODO: Further investigate on this issue |
There was a problem hiding this comment.
Is it for the bias node or something else? Can you double check? Why didn't we get the problem in the past?
There was a problem hiding this comment.
It should be another input node for "add".
We did not meet this in the past because we only enabled and tested lp for mkldnn fusion. For lp case, there will be a "to_dtype" inserted by autocast and will not match this pattern.
I am trying to find a case to satisfy this pattern by raising a runtime error if this function will return True.
#127597
|
@pytorchbot merge |
Merge failedReason: Approvers from one of the following sets are needed:
|
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
When
torch.backends.mkldnn.matmul.fp32_precision=='bf16', we also enabled mkldnn linear in inductor path and allow to run with bf16 computation data type.Testplan:
Stack from ghstack (oldest at bottom):
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @peterbell10 @yf225 @ColinPeppler @desertfire