forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 9
Change any op implementation to be more similar to CPU #280
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
razarmehr
reviewed
Feb 2, 2023
Co-authored-by: Ramin Azarmehr <razarmehr@apple.com>
kulinseth
reviewed
Feb 4, 2023
test/test_mps.py
Outdated
| 'sgn': [torch.bool], | ||
| 'linalg.inv': [torch.float32], | ||
| 'linalg.inv_ex': [torch.float32], | ||
| # 'linalg.inv': [torch.float32], |
Owner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| # 'linalg.inv': [torch.float32], |
kulinseth
reviewed
Feb 4, 2023
test/test_mps.py
Outdated
| 'linalg.inv': [torch.float32], | ||
| 'linalg.inv_ex': [torch.float32], | ||
| # 'linalg.inv': [torch.float32], | ||
| # 'linalg.inv_ex': [torch.float32], |
Owner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| # 'linalg.inv_ex': [torch.float32], |
* Fix addmm calculation: - ignore input when beta is 0, so that nan and inf will not be propagated. * - add is_beta_non_zero variable
- This should fix the hard crashes reported in BLOCKLIST_OP_GRAD such as sigmoid, tanh, masked_fill, linear, prelu, etc. - The prelu now fails with correctness issues so I kept it in the blocklist
- This should fix cross_entropy_backward() too - Take grad_output into account when computing nll_loss_backward() - Clean up
- Take grad_output into account when computing smooth_l1_backward() - Add numel()==0 check to prevent crashes - Clean up and formatting
- This patch moves several Grad tests related to FP16 precision from block list to FP16_LOW_PRECISION_LIST which should produce correct output.
- fix gelu_backward_out_mps key - uniform format - add caculation for tanh approximate backward pass - unblock grad test from blocklist - fix lintrunner errors
* Use DISTRIBUTED=1 for MPS CI runners * Disable openmp
Co-authored-by: sidk <sidk@sidks-mbp.lan>
…OUR, as zero to negative integer powers are undefined (#288)
- Add divisor to cached string key to avoid conflicts - Fallback to CPU when divisor is passed for int64 input types - Remove MaxPool2D from UNIMPLEMENTED_OP list (was put there by mistake) - Add test case when both ceil_mode and count_include_pad are True (previously failed).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue with any op implementation was responsible for segfaults seen in Inverse: #270. Changed how we handle empty input to match what is done on cpu side