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

[MPS] Fix abs for complex types #125662

Closed
wants to merge 7 commits into from
Closed

[MPS] Fix abs for complex types #125662

wants to merge 7 commits into from

Conversation

malfet
Copy link
Contributor

@malfet malfet commented May 7, 2024

By calling realPartOfTensor: if input type is complex on Sonoma and fall back to at::view_as_real trick on Ventura.

Split unary_op template into unary_op and unary_op_noresize, which skips resize and empty checks

Marked abs, isclose and nn.functional.softsign OpInfo tests as supported by complex types

Fixes #125135

By calling `realPartOfTensor:` if input type is abs
@malfet malfet requested a review from kulinseth as a code owner May 7, 2024 06:39
Copy link

pytorch-bot bot commented May 7, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125662

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit bb3405f with merge base f35fe4e (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels May 7, 2024
@malfet malfet added the topic: bug fixes topic category label May 7, 2024
Copy link
Collaborator

@kulinseth kulinseth left a comment

Choose a reason for hiding this comment

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

Looks good..

@malfet
Copy link
Contributor Author

malfet commented May 7, 2024

@pytorchbot merge -f "MPS tests and lint are green"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

@atalman
Copy link
Contributor

atalman commented May 13, 2024

@pytorchbot cherry-pick --onto release/2.3 -c critical

pytorchbot pushed a commit that referenced this pull request May 13, 2024
By calling `realPartOfTensor:` if input type is complex on Sonoma and fall back to `at::view_as_real` trick on Ventura.

Split `unary_op` template into `unary_op` and `unary_op_noresize`, which skips resize and empty checks

Marked `abs`, `isclose` and `nn.functional.softsign` OpInfo tests as supported by complex types

Fixes #125135

Pull Request resolved: #125662
Approved by: https://github.com/kulinseth

(cherry picked from commit 0fd1fc1)
@pytorchbot
Copy link
Collaborator

Cherry picking #125662

The cherry pick PR is at #126096 and it is recommended to link a critical cherry pick PR with an issue

Details for Dev Infra team Raised by workflow job

huydhn pushed a commit that referenced this pull request May 13, 2024
[MPS] Fix `abs` for complex types (#125662)

By calling `realPartOfTensor:` if input type is complex on Sonoma and fall back to `at::view_as_real` trick on Ventura.

Split `unary_op` template into `unary_op` and `unary_op_noresize`, which skips resize and empty checks

Marked `abs`, `isclose` and `nn.functional.softsign` OpInfo tests as supported by complex types

Fixes #125135

Pull Request resolved: #125662
Approved by: https://github.com/kulinseth

(cherry picked from commit 0fd1fc1)

Co-authored-by: Nikita Shulga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/mps Run MPS tests (subset of trunk) Merged release notes: mps Release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tensor.abs() gives incorrect results on Complex64 when using MPS
5 participants