8000 [MPS] Enable angle and atan2 for `torch.long` by malfet · Pull Request #149017 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[MPS] Enable angle and atan2 for torch.long #149017

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
wants to merge 1 commit into from

Conversation

malfet
Copy link
Contributor
@malfet malfet commented Mar 12, 2025

This check was added by #85817, that introduced no unit-tests and its content seems to be totally unrelated to title/subject of that PR. Anyway, right now it seems to be working fine on MacOS-13+

@malfet malfet requested a review from kulinseth as a code owner March 12, 2025 01:26
Copy link
pytorch-bot bot commented Mar 12, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 30 Pending

As of commit f20efa3 with merge base 6057641 (image):

NEW FAILURE - The following job has failed:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot pytorch-bot bot added ciflow/inductor ciflow/mps Run MPS tests (subset of trunk) module: inductor release notes: mps Release notes category labels Mar 12, 2025
@malfet malfet force-pushed the malfet/enable-angle-atan2-for-int64 branch from c2c5deb to d248dd8 Compare March 12, 2025 01:26
@malfet malfet changed the title malfet/enable angle atan2 for int64 [MPS] Enable angle and atan2 for torch.long Mar 12, 2025
@malfet malfet requested review from Skylion007 and dcci March 12, 2025 01:27
Copy link
Member
@dcci dcci left a comment

Choose a reason for hiding this comment

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

Nice, left some minor comments inline.

@@ -397,7 +397,7 @@ static void add_sub_lerp_template(const Tensor& self,
});
}
TORCH_IMPL_FUNC(atan2_out_mps)(const Tensor& self, const Tensor& other, const Tensor& output) {
TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support atan2 op with int64 input");
// TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support atan2 op with int64 input");
Copy link
Member

Choose a reason for hiding this comment

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

Instead of commenting this out, can you just remove the line?

@@ -272,7 +272,7 @@ static void unary_op(const Tensor& self,
}

Tensor& angle_out_mps(const Tensor& self, Tensor& output) {
TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support angle op with int64 input");
// TORCH_CHECK(self.scalar_type() != ScalarType::Long, "MPS does not support angle op with int64 input");
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept them around, thinking that may be something will fail on MacOS-13, but it did not, so now I can just remove this check

test/test_mps.py Outdated
@@ -710,8 +710,8 @@ def mps_ops_modifier(ops):
'index_add': [torch.int64],
'log1p': [torch.int64],
'sigmoid': [torch.int64],
'atan2': [torch.int64],
'angle': [torch.int64],
# 'atan2': [torch.int64],
Copy link
Member

Choose a reason for hiding this comment

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

ditto

May be those ops were unsupported on MacOS-12, but they work fine in
MacOS-15
@malfet malfet force-pushed the malfet/enable-angle-atan2-for-int64 branch from d248dd8 to f20efa3 Compare March 12, 2025 04:46
@malfet
Copy link
Contributor Author
malfet commented Mar 12, 2025

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

@malfet malfet deleted the malfet/enable-angle-atan2-for-int64 branch March 14, 2025 02:03
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.

3 participants
0