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 bug when value is of complex #111937

Closed
wants to merge 3 commits into from

Conversation

qqaatw
Copy link
Collaborator

@qqaatw qqaatw commented Oct 24, 2023

Stack from ghstack (oldest at bottom):

When the value of fill is of complex, this line value.toDouble() == 0.0 will error out saying that converting complex to double will cause overflow. So we should firstly handle the complex value and then enter this condition.

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Oct 24, 2023
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 24, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit a3a5c61 with merge base fb88760 (image):
💚 Looks good so far! There are no failures yet. 💚

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

qqaatw added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 3472574f54a6e4da784db3ba1f626f8643686e2f
Pull Request resolved: #111937
@qqaatw qqaatw requested a review from malfet October 24, 2023 16:17
qqaatw added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 66186be870fa49fb3ddb1551baceed22b4d5e579
Pull Request resolved: #111937
qqaatw added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 95acb1f1c30fa0eec9aad48c5da78f0637ce617f
Pull Request resolved: #111937
@qqaatw
Copy link
Collaborator Author

qqaatw commented Oct 27, 2023

Hi @malfet, can you please take a look? as there is a bug in the first PR.

@malfet
Copy link
Contributor

malfet commented Oct 27, 2023

@qqaatw Can you add a bit longer description what exactly regressed? And yes, unit tests are good thing, aren't they?

@qqaatw
Copy link
Collaborator Author

qqaatw commented Oct 27, 2023

@qqaatw Can you add a bit longer description what exactly regressed? And yes, unit tests are good thing, aren't they?

Sure, added a description. Nothing regressed, I just didn't do the thing well so I'm fixing it. Yes unit tests are great, I agree.

@qqaatw
Copy link
Collaborator Author

qqaatw commented Oct 31, 2023

Hi @malfet, does this PR look good to you now?

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the update.

@malfet
Copy link
Contributor

malfet commented Oct 31, 2023

@pytorchbot merge -f "MPS tests 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

@facebook-github-bot facebook-github-bot deleted the gh/qqaatw/25/head branch November 4, 2023 14:26
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
When the value of `fill` is of complex, this line `value.toDouble() == 0.0` will error out saying that converting complex to double will cause overflow. So we should firstly handle the complex value and then enter this condition.

Pull Request resolved: pytorch#111937
Approved by: https://github.com/malfet
ghstack dependencies: pytorch#111885
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
When the value of `fill` is of complex, this line `value.toDouble() == 0.0` will error out saying that converting complex to double will cause overflow. So we should firstly handle the complex value and then enter this condition.

Pull Request resolved: pytorch#111937
Approved by: https://github.com/malfet
ghstack dependencies: pytorch#111885
andreigh pushed a commit to andreigh/pytorch that referenced this pull request Nov 19, 2023
When the value of `fill` is of complex, this line `value.toDouble() == 0.0` will error out saying that converting complex to double will cause overflow. So we should firstly handle the complex value and then enter this condition.

Pull Request resolved: pytorch#111937
Approved by: https://github.com/malfet
ghstack dependencies: pytorch#111885
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 open source release notes: mps Release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants