Skip to content

Connect Tensor.__ipow__ to pow_ method#76900

Closed
amjames wants to merge 9 commits intogh/amjames/2/basefrom
gh/amjames/2/head
Closed

Connect Tensor.__ipow__ to pow_ method#76900
amjames wants to merge 9 commits intogh/amjames/2/basefrom
gh/amjames/2/head

Conversation

@amjames
Copy link
Copy Markdown
Collaborator

@amjames amjames commented May 5, 2022

Stack from ghstack (oldest at bottom):

The pow_ method should be connected to Tensor.__ipow__ so that the
operator **= works correctly.

Part of #58742

The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented May 5, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

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

Expand to see more

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


This comment was automatically generated by Dr. CI (expand for details).

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

Click here to manually regenerate this comment.

The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
@kshitij12345
Copy link
Copy Markdown
Collaborator

Thanks for the PR @amjames!

However, I confirmed with @Dbhasin1 that she plans to update her PR #71984. So it would be great if you can help review that one.

The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
@Dbhasin1
Copy link
Copy Markdown

Hi @amjames, this looks good from the array API compliance point of view. I think we'll just need to add a test for **= in test_binary_ufuncs.py

@amjames
Copy link
Copy Markdown
Collaborator Author

amjames commented May 11, 2022

@Dbhasin1 Thanks for looking this over. I can add that test. It is worth mentioning for future reference, after #76901 it would be redundant.

The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
@amjames amjames requested review from mruberry and ngimel as code owners May 11, 2022 18:11
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
Copy link
Copy Markdown
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Cool!

amjames added 2 commits May 12, 2022 15:32
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

[ghstack-poisoned]
amjames added 2 commits May 13, 2022 13:39
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

Part of #58742

[ghstack-poisoned]
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

Part of #58742

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request May 17, 2022
Summary:
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

Pull Request resolved: #76900

Approved by: https://github.com/mruberry

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/39d3a7ffe57740678aff41027857c1a84c941cd5

Reviewed By: atalman

Differential Revision: D36412517

Pulled By: atalman

fbshipit-source-id: a3a8ac2e3f5ca1f621e2bdf085aafaad54deec6b
@facebook-github-bot facebook-github-bot deleted the gh/amjames/2/head branch May 19, 2022 14:16
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
The `pow_` method should be connected to `Tensor.__ipow__` so that the
operator `**=` works correctly.

Pull Request resolved: pytorch#76900

Approved by: https://github.com/mruberry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants