Skip to content

Optimize implementation of torch.pow#46830

Closed
Kiyosora wants to merge 2 commits intopytorch:masterfrom
Kiyosora:pow_implementation_optimize
Closed

Optimize implementation of torch.pow#46830
Kiyosora wants to merge 2 commits intopytorch:masterfrom
Kiyosora:pow_implementation_optimize

Conversation

@Kiyosora
Copy link
Copy Markdown
Contributor

@Kiyosora Kiyosora commented Oct 26, 2020

@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch from b58e34a to de7da46 Compare October 26, 2020 03:17
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Oct 26, 2020

💊 CI failures summary and remediations

As of commit dfe8670175 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch 4 times, most recently from e0f9115 to 0b9deb5 Compare October 27, 2020 06:17
@Kiyosora Kiyosora changed the title [WIP] Optimize implementation of torch.pow Optimize implementation of torch.pow Oct 27, 2020
@Kiyosora Kiyosora marked this pull request as ready for review October 27, 2020 10:02
@mrshenli mrshenli requested a review from ezyang October 27, 2020 14:57
@mrshenli mrshenli added the module: custom-operators custom operators, custom ops, custom-operators, custom-ops label Oct 27, 2020
@mrshenli mrshenli requested review from gchanan and zou3519 October 27, 2020 14:58
@mrshenli mrshenli added module: named tensor Named tensor support triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Oct 27, 2020
@mrshenli
Copy link
Copy Markdown
Contributor

adding @zou3519, as this PR is adding named tensor support to the operator

Copy link
Copy Markdown
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

okey dokey

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang ezyang requested a review from anjali411 October 30, 2020 15:51
@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Oct 30, 2020

@anjali411 I just realized that this PR intersects with your fix for the accidental complex promotion. Do you think you could work these changes into your patchset in some way? Otherwise I'll wait for your fix to land and rebase this on top of yours.

@Kiyosora
Copy link
Copy Markdown
Contributor Author

I rebased this PR since it has been a while. BTW, if there is anything else I can do for this PR, I‘d like to be the help.

@anjali411
Copy link
Copy Markdown
Contributor

@ezyang sorry I completely missed this PR. let me merge my pow PR as is and then we can merge this as a follow-up change.

@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch from 37c25a3 to 929ad85 Compare November 30, 2020 05:33
@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch from 929ad85 to d159ac7 Compare December 16, 2020 07:44
@anjali411
Copy link
Copy Markdown
Contributor

Hi @Kiyosora can you rebase this PR on the latest master?

@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch from d159ac7 to 4da9ade Compare January 13, 2021 02:22
@Kiyosora
Copy link
Copy Markdown
Contributor Author

Hi @Kiyosora can you rebase this PR on the latest master?

Sure, I've rebase this PR on the latest master. @anjali411

Comment thread aten/src/ATen/native/Pow.cpp Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Kiyosora can you please retain this check to exp.equal(0.0) (as in master)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed!

Comment thread aten/src/ATen/native/Pow.cpp Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is no longer needed. let's remove this!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed!

Comment thread aten/src/ATen/native/Pow.cpp Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same comment as above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed!

Comment thread aten/src/ATen/native/Pow.cpp Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same comment as above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed!

Comment thread aten/src/ATen/native/Pow.cpp Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same as above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed!

@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch 2 times, most recently from dfe8670 to 779026a Compare January 14, 2021 14:47
@Kiyosora Kiyosora force-pushed the pow_implementation_optimize branch from 779026a to d014a9f Compare January 14, 2021 21:16
@Kiyosora Kiyosora requested a review from anjali411 January 15, 2021 07:18
Copy link
Copy Markdown
Contributor

@anjali411 anjali411 left a comment

Choose a reason for hiding this comment

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

LGTM thanks @Kiyosora

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@anjali411 merged this pull request in d140ca8.

@Kiyosora Kiyosora deleted the pow_implementation_optimize branch January 25, 2021 02:02
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
- Related with pytorch#44937
- Use `resize_output` instead of `resize_as`
- Tuning the `native_functions.yaml`, move the inplace variant `pow_` next to the other `pow` entries

Pull Request resolved: pytorch#46830

Reviewed By: mrshenli

Differential Revision: D24567702

Pulled By: anjali411

fbshipit-source-id: a352422c9d4e356574dbfdf21fb57f7ca7c6075d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: custom-operators custom operators, custom ops, custom-operators, custom-ops module: named tensor Named tensor support open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants