-
Notifications
You must be signed in to change notification settings - Fork 23.3k
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
torchdynamo: add convolution pointwise(unary) fusion kernel #86581
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86581
Note: Links to docs will display an error until the docs builds have been completed. ✅ No Failures, 4 PendingAs of commit abaafbf: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
aten/src/ATen/native/mkldnn/Conv.cpp
Outdated
IntArrayRef stride, | ||
IntArrayRef dilation, | ||
int64_t groups, | ||
std::string attr, |
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.
Use c10::string_view
instead?
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.
Yes, changed.
aten/src/ATen/native/mkldnn/Conv.cpp
Outdated
int64_t groups, | ||
std::string attr, | ||
std::vector<c10::optional<at::Scalar>> scalars, | ||
c10::optional<std::string> algorithm) { |
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.
ditto: c10::optional<c10::string_view>
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.
cc @chunyuan-w
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.
changed.
aten/src/ATen/native/mkldnn/Conv.cpp
Outdated
IntArrayRef dilation, | ||
int64_t groups, | ||
std::string attr, | ||
std::vector<c10::optional<at::Scalar>> scalars, |
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.
torch::List
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.
test/test_mkldnn_fusion.py
Outdated
@@ -13,7 +13,6 @@ | |||
|
|||
FUSION_GROUP = 'prim::TensorExprGroup' | |||
|
|||
|
|||
class EltwiseFusionOp(NamedTuple): |
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.
PointwisePostOp
is more accurate?
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.
Yes, I change it.
Support unary fusion of Convolution with: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu [ghstack-poisoned]
Support unary fusion of Convolution with: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu [ghstack-poisoned]
@jansel , could you help review this PR for TorchInductor? |
@jansel , I noticed that you approved the other two PRs. May I know if you have any concerns about this PR? |
Nope just missed it. Sorry, too many notifications! |
@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 |
Merge failedReason: Command
Details for Dev Infra teamRaised by workflow job |
@XiaobingSuper , could you please rebase the PR and resolve the conflict? |
Support unary fusion of Convolution with: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu [ghstack-poisoned]
@EikanWang , code rebased. |
Support unary fusion of Convolution with: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu [ghstack-poisoned]
@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 |
Hey @XiaobingSuper. |
Stack from ghstack (oldest at bottom):
Support unary fusion of Convolution with: