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

[inductor] Lower diagonal, diagonal_copy and diagonal_scatter #103755

Closed
wants to merge 9 commits into from

Conversation

peterbell10
Copy link
Collaborator

@peterbell10 peterbell10 commented Jun 16, 2023

This decomposes `diagonal_copy` into `as_strided_copy` and `diagonal_scatter`
into `as_strided_scatter`.

Currently these are decomposed into mutations, which can't be used by inductor
because the `_scatter` and `_copy` variants are output by functionalization to
remove mutations from the graph. So by re-introducing mutations in their
decomposition, we break the assumptions of the graph.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 16, 2023

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit bbc046e:

NEW FAILURES - The following jobs have failed:

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

peterbell10 added a commit that referenced this pull request Jun 16, 2023
This decomposes `diagonal_copy` into `as_strided_copy` and `diagonal_scatter`
into `as_strided_scatter`.

Currently these are decomposed into mutations, which can't be used by inductor
because the `_scatter` and `_copy` variants are output by functionalization to
remove mutations from the graph. So by re-introducing mutations in their
decomposition, we break the assumptions of the graph.

ghstack-source-id: 5b6b8ef2fc3dd6439fc90af744324610bf2b4fa1
Pull Request resolved: #103755
peterbell10 added a commit to peterbell10/pytorch that referenced this pull request Jun 16, 2023
This decomposes `diagonal_copy` into `as_strided_copy` and `diagonal_scatter`
into `as_strided_scatter`.

Currently these are decomposed into mutations, which can't be used by inductor
because the `_scatter` and `_copy` variants are output by functionalization to
remove mutations from the graph. So by re-introducing mutations in their
decomposition, we break the assumptions of the graph.

ghstack-source-id: 5b6b8ef2fc3dd6439fc90af744324610bf2b4fa1
Pull Request resolved: pytorch#103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
@peterbell10 peterbell10 changed the title [inductor] Decompose diagonal_copy and diagonal_scatter [inductor] Lower diagonal, diagonal_copy and diagonal_scatter Jun 16, 2023
peterbell10 added a commit that referenced this pull request Jun 16, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: 55735b7107b2063b21d07bf66a3bead775043582
Pull Request resolved: #103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
peterbell10 added a commit that referenced this pull request Jun 16, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: ae0f5fad6fc0434f9e6688ca2adcd6de001ae7a6
Pull Request resolved: #103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
peterbell10 added a commit that referenced this pull request Jun 16, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: 3781141ab7e2cbe885bab16401e243a1afd20f78
Pull Request resolved: #103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
peterbell10 added a commit to peterbell10/pytorch that referenced this pull request Jun 19, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: e3c4d8e7dc7a2aee2c757b075e9654f71fcaf733
Pull Request resolved: pytorch#103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
peterbell10 added a commit to peterbell10/pytorch that referenced this pull request Jun 19, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: b0b2191e196980f1f386047d154ad050fa1f49a0
Pull Request resolved: pytorch#103755
peterbell10 added a commit to peterbell10/pytorch that referenced this pull request Jun 20, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: b0b2191e196980f1f386047d154ad050fa1f49a0
Pull Request resolved: pytorch#103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
peterbell10 added a commit to peterbell10/pytorch that referenced this pull request Jun 21, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: 6f00f2f71fe4eded382a8f2f7915bb19f904cbc6
Pull Request resolved: pytorch#103755
…ter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

[ghstack-poisoned]
@peterbell10
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 21, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@peterbell10
Copy link
Collaborator Author

@pytorchbot merge

@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

…onal_scatter"

Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy ngimel yf225 chenyang78

[ghstack-poisoned]
@peterbell10 peterbell10 removed the ciflow/trunk Trigger trunk jobs on your pull request label Jun 21, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: New commits were pushed while merging. Please rerun the merge command.

Details for Dev Infra team Raised by workflow job

@peterbell10 peterbell10 added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 21, 2023
@peterbell10
Copy link
Collaborator Author

@pytorchbot merge

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 jobs have failed, first few of them are: linux-binary-manywheel / manywheel-py3_8-cuda12_1-with-pypi-cudnn-test, linux-binary-manywheel / manywheel-py3_8-cuda11_8-test

Details for Dev Infra team Raised by workflow job

@peterbell10
Copy link
Collaborator Author

@pytorchbot merge

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 jobs have failed, first few of them are: linux-binary-manywheel / manywheel-py3_8-cuda12_1-with-pypi-cudnn-test, linux-binary-manywheel / manywheel-py3_8-cuda11_8-test

Details for Dev Infra team Raised by workflow job

@peterbell10
Copy link
Collaborator Author

@pytorchbot merge -f "CI is 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).

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

vkallesh pushed a commit to amd/ZenDNN-pytorch that referenced this pull request Jul 5, 2023
Currently these are decomposed into `as_strided`, which forces a buffer to be
realized. Instead, this lowers them into a native inductor view node and so
doesn't require any buffers to be realized.

ghstack-source-id: da503c44398dd41be29c6e25d7be98b3bd930fc5
Pull Request resolved: pytorch/pytorch#103755
@facebook-github-bot facebook-github-bot deleted the gh/peterbell10/569/head branch July 22, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants