8000 Avoid overwriting COW data in MPS code by kurtamohler · Pull Request #150721 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Avoid overwriting COW data in MPS code #150721

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

Open
wants to merge 31 commits into
base: gh/kurtamohler/34/base
Choose a base branch
from

Conversation

kurtamohler
Copy link
Collaborator
@kurtamohler kurtamohler commented Apr 4, 2025

Fixes MPS ops that were breaking COW behavior by overwriting data without first materializing. Along with necessary materializations, this also introduces many unnecessary materializations, but the MPS-CPU lazy cloning feature should now be safe to use.

Also introduces APIs in the MPS code which will be used in preventing unnecessary materializations in future PRs.

Stack from ghstack (oldest at bottom):

[ghstack-poisoned]
Copy link
pytorch-bot bot commented Apr 4, 2025

🔗 Helpful Links

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

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

❌ 6 New Failures, 1 Unrelated Failure

As of commit f94aa9d with merge base 56e1c23 (image):

NEW FAILURES - The following jobs have 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/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Apr 4, 2025
[ghstack-poisoned]
@kurtamohler
Copy link
Collaborator Author
kurtamohler commented Apr 4, 2025

To be confident that I didn't miss anything, I will have to add a test that runs through the op_db and confirm that no MPS operators mutate the underlying data of COW inputs. Basically it would be a reduced version of the test_cow_input test in test_ops.py, but it would allow materialization of any inputs and ONLY make sure that the underlying COW data doesn't change. In the future, we should enable the full test_cow_input on MPS, but it will take a significant amount of work to get that to pass

[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 5, 2025
ghstack-source-id: 063d9d0
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 5, 2025
ghstack-source-id: 10edf84
Pull Request resolved: pytorch#150721
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 7, 2025
ghstack-source-id: 10edf84
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 7, 2025
ghstack-source-id: bc91047
Pull Request resolved: pytorch#150721
@kurtamohler kurtamohler added the keep-going Don't stop on first failure, keep running tests until the end label Apr 7, 2025
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 7, 2025
ghstack-source-id: 278497b
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 7, 2025
ghstack-source-id: c9c7b65
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 8, 2025
ghstack-source-id: a2c05ca
Pull Request resolved: pytorch#150721
Divigroup-RAP pushed a commit to Divigroup-RAP/PYTORCH that referenced this pull request Apr 22, 2025
ghstack-source-id: 77de1e4
Pull Request resolved: pytorch/pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 25, 2025
ghstack-source-id: 5b304e2
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 28, 2025
ghstack-source-id: 3719e28
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 28, 2025
ghstack-source-id: df7717f
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 29, 2025
ghstack-source-id: a1783ae
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 29, 2025
ghstack-source-id: 2746d1f
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 30, 2025
ghstack-source-id: 671272f
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request Apr 30, 2025
ghstack-source-id: a7e9ce0
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request May 1, 2025
ghstack-source-id: 62fac33
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request May 13, 2025
ghstack-source-id: 62fac33
Pull Request resolved: pytorch#150721
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request May 14, 2025
ghstack-source-id: 62fac33
Pull Request resolved: pytorch#150721
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request May 16, 2025
ghstack-source-id: 62fac33
Pull Request resolved: pytorch#150721
[ghstack-poisoned]
kurtamohler added a commit to kurtamohler/pytorch that referenced this pull request May 16, 2025
ghstack-source-id: 20fca86
Pull Request resolved: pytorch#150721
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) keep-going Don't stop on first failure, keep running tests until the end open source release notes: mps Release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0