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

masked_scatter should accept only bool masks #97999

Closed
wants to merge 2 commits into from

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Mar 30, 2023

Modify test_torch to check that assert is raised in this case

torch.uint8 usage has been deprecated for a few releases, and errors has been raised for other dtypes on CUDA device, but not on CPU.
This PR finally restricts mask to just torch.bool
See #96594 as an example doing it for torch.masked_fill

Fixes #94634

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @mikaylagawarecki

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 30, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 5c98e02:
💚 Looks good so far! There are no failures yet. 💚

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

@github-actions github-actions bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Mar 30, 2023
@ngimel
Copy link
Collaborator

ngimel commented Mar 30, 2023

I hope there won't be a SEV from byte removal, last time there was.

@facebook-github-bot
Copy link
Contributor

@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@malfet
Copy link
Contributor Author

malfet commented Mar 30, 2023

@ngimel good point, importing internally to see what is going on

@malfet malfet changed the title masked_scatter shoudl accept only bool masks masked_scatter should accept only bool masks Mar 30, 2023
@malfet malfet added the release notes: python_frontend release notes category label Mar 30, 2023
@ezyang ezyang removed their request for review March 30, 2023 21:16
malfet and others added 2 commits March 31, 2023 16:35
Modify test_torch to check that assert is raised in this case

torch.uint8 usage has been deprecated for a few releases, this diff
finally removes it completely.

Fixes #94634
@malfet malfet force-pushed the malfet/allow-only-bool-mask-to-scatter branch from e76fda5 to 5c98e02 Compare April 1, 2023 16:47
@malfet malfet requested a review from mruberry as a code owner April 1, 2023 16:47
@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 1, 2023
@malfet
Copy link
Contributor Author

malfet commented Apr 1, 2023

@pytorchbot merge -ic

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: Meta Internal-Only Changes Check

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/allow-only-bool-mask-to-scatter branch April 6, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) module: scatter & gather ops release notes: python_frontend release notes category topic: bc breaking topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

masked_scatter should only accept bool tensors as mask
4 participants