Skip to content
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

Closed

Conversation

XiaobingSuper
Copy link
Collaborator

@XiaobingSuper XiaobingSuper commented Oct 10, 2022

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 10, 2022

🔗 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 Pending

As of commit abaafbf:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@XiaobingSuper XiaobingSuper changed the title torchdynamo: add convolution eltwise fusion kernel torchdynamo: add convolution pointwise(unary) fusion kernel Oct 11, 2022
IntArrayRef stride,
IntArrayRef dilation,
int64_t groups,
std::string attr,
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, changed.

int64_t groups,
std::string attr,
std::vector<c10::optional<at::Scalar>> scalars,
c10::optional<std::string> algorithm) {
Copy link
Collaborator

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>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed.

IntArrayRef dilation,
int64_t groups,
std::string attr,
std::vector<c10::optional<at::Scalar>> scalars,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch::List

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -13,7 +13,6 @@

FUSION_GROUP = 'prim::TensorExprGroup'


class EltwiseFusionOp(NamedTuple):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PointwisePostOp is more accurate?

Copy link
Collaborator Author

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]
@XiaobingSuper XiaobingSuper requested a review from jgong5 October 12, 2022 04:37
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 12, 2022
Support unary fusion of Convolution with:

- relu
- sigmoid
- tanh
- hardswish
- leaky_relu
- hardtanh
- gelu


[ghstack-poisoned]
@EikanWang EikanWang requested a review from jansel October 13, 2022 02:19
@EikanWang
Copy link
Collaborator

@jansel , could you help review this PR for TorchInductor?

@EikanWang
Copy link
Collaborator

@jansel , I noticed that you approved the other two PRs. May I know if you have any concerns about this PR?

@jansel
Copy link
Contributor

jansel commented Oct 13, 2022

@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!

@EikanWang
Copy link
Collaborator

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@EikanWang EikanWang added the intel This tag is for PR from Intel label Oct 13, 2022
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch cherry-pick -x 21de60fc3dbadb75901e4c163bbe1d9848f8cb88 returned non-zero exit code 1

Auto-merging aten/src/ATen/native/mkldnn/Conv.cpp
CONFLICT (content): Merge conflict in aten/src/ATen/native/mkldnn/Conv.cpp
Auto-merging aten/src/ATen/native/mkldnn/Linear.cpp
error: could not apply 21de60fc3d... torchdynamo: add convolution pointwise(unary) fusion kernel
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
Details for Dev Infra team Raised by workflow job

@EikanWang
Copy link
Collaborator

@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]
@XiaobingSuper
Copy link
Collaborator Author

@EikanWang , code rebased.

Support unary fusion of Convolution with:

- relu
- sigmoid
- tanh
- hardswish
- leaky_relu
- hardtanh
- gelu


[ghstack-poisoned]
@EikanWang
Copy link
Collaborator

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@github-actions
Copy link
Contributor

Hey @XiaobingSuper.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@facebook-github-bot facebook-github-bot deleted the gh/XiaobingSuper/13/head branch June 8, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request intel This tag is for PR from Intel Merged open source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants