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] Add complex support for fill #111885

Closed
wants to merge 4 commits into from
Closed

Conversation

qqaatw
Copy link
Collaborator

@qqaatw qqaatw commented Oct 24, 2023

Stack from ghstack (oldest at bottom):

Fixes #110537

[ghstack-poisoned]
@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/111885

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

✅ No Failures

As of commit e4fad99 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: 3d80018585a6a8094cf6c263b4317e0aca16047c
Pull Request resolved: #111885
@qqaatw qqaatw changed the title [MPS] Add complex support for [MPS] Add complex support for fill Oct 24, 2023
qqaatw added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 01c4b115d47a44dc9a329d266fbd80e3847526d2
Pull Request resolved: #111885
qqaatw added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 35c0a700d5369f39fdca756fa60ffc63d6202345
Pull Request resolved: #111885
@qqaatw qqaatw requested review from malfet and albanD October 24, 2023 01:54
Comment on lines 98 to 99
fill_scalar_mps_impl(self_as_real_real, Scalar(value_cdouble.real()));
fill_scalar_mps_impl(self_as_real_imag, Scalar(value_cdouble.imag()));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
fill_scalar_mps_impl(self_as_real_real, Scalar(value_cdouble.real()));
fill_scalar_mps_impl(self_as_real_imag, Scalar(value_cdouble.imag()));
fill_scalar_mps_impl(self_as_real_real, value_cdouble.real());
fill_scalar_mps_impl(self_as_real_imag, value_cdouble.imag());

qqaatw added a commit that referenced this pull request Oct 24, 2023
ghstack-source-id: 7acafed6ce55d47e6ac37231eb15ca9d2cb35b9b
Pull Request resolved: #111885
@qqaatw
Copy link
Collaborator Author

qqaatw commented Oct 24, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 24, 2023
@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

andreigh pushed a commit to andreigh/pytorch that referenced this pull request Oct 26, 2023
@facebook-github-bot facebook-github-bot deleted the gh/qqaatw/24/head branch October 27, 2023 14:25
pytorchmergebot pushed a commit that referenced this pull request Oct 31, 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: #111937
Approved by: https://github.com/malfet
ghstack dependencies: #111885
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
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
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) ciflow/trunk Trigger trunk jobs on your pull request 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