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] Disallow reshape in slice #95905

Closed

Conversation

DenisVieriu97
Copy link
Collaborator

Disallow reshapes for arrayViews.
Current code allows a base shape of [2, 4, 256] to be sliced into [4, 1, 256] (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes #95883

@DenisVieriu97 DenisVieriu97 added the ciflow/mps Run MPS tests (subset of trunk) label Mar 2, 2023
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 2, 2023

🔗 Helpful Links

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

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

✅ No Failures

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

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

@pytorch-bot pytorch-bot bot added the release notes: mps Release notes category label Mar 2, 2023
Copy link
Collaborator

@razarmehr razarmehr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@kulinseth kulinseth left a comment

Choose a reason for hiding this comment

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

Please add the other 2 tests.

@DenisVieriu97
Copy link
Collaborator Author

@pytorchbot merge -g

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

kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Mar 3, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch#95883
Pull Request resolved: pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Mar 3, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch#95883
Pull Request resolved: pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth
malfet pushed a commit that referenced this pull request Mar 3, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes #95883
Pull Request resolved: #95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth

Co-authored-by: Denis Vieriu <dvieriu@apple.com>
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 5, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch/pytorch#95883
Pull Request resolved: pytorch/pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 5, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch/pytorch#95883
Pull Request resolved: pytorch/pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth
ydwu4 pushed a commit to ydwu4/pytorch that referenced this pull request Mar 10, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch#95883
Pull Request resolved: pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth
ydwu4 added a commit to ydwu4/pytorch that referenced this pull request Mar 13, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch#95883
Pull Request resolved: pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth
pruthvistony pushed a commit to ROCm/pytorch that referenced this pull request May 3, 2023
Disallow reshapes for arrayViews.
Current code allows a base shape of `[2, 4, 256]` to be sliced into `[4, 1, 256]` (view's shape) - which is not possible. Slicing a smaller dimension into a bigger one will always error out.

Fixes pytorch#95883
Pull Request resolved: pytorch#95905
Approved by: https://github.com/razarmehr, https://github.com/kulinseth

Co-authored-by: Denis Vieriu <dvieriu@apple.com>
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
5 participants