Skip to content

Record inputs at time of tracing, constrain to them for triton fn - #145448

Closed
eellison wants to merge 12 commits into
gh/eellison/753/basefrom
gh/eellison/753/head
Closed

eellison wants to merge 12 commits into
gh/eellison/753/basefrom
gh/eellison/753/head

Conversation

@eellison

@eellison eellison commented Jan 23, 2025 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Record input fake tensors at time of tracing and store them in the node meta. Inductor passes have the possibility of changing strides, so it is safer to record the strides of the inputs at tracing. See, #137979 for more context.

We can also extend this to custom ops, and user-visible outputs. If this ends up being compilation time sensitive we can just record strides (and maybe storage offset, per @zou3519) instead of the complete fake tensor.

cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @voznesenskym @penguinwu @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @aakhundov

@pytorch-bot

pytorch-bot Bot commented Jan 23, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 0d7060e with merge base 354fe48 (image):
💚 Looks good so far! There are no failures yet. 💚

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

eellison added a commit that referenced this pull request Jan 23, 2025
… for triton fn"

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 23, 2025 16:03 Inactive
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 23, 2025 16:03 Inactive
… for triton fn"

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
… for triton fn"

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
… for triton fn"

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
@eellison
eellison requested a review from zou3519 January 23, 2025 17:23
… for triton fn"


Record input fake tensors at time of tracing and store them in the node meta. Inductor passes have the possibility of changing strides, so it is safer to record the strides of the inputs at tracing. See, #137979 for more context. 

We can also extend this to custom ops, and user-visible outputs. If this ends up being compilation time sensitive we can just record strides (and maybe storage offset, per zou3519) instead of the complete fake tensor. 


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
@eellison eellison changed the title Record input strides at time of tracing, constrain to them for triton fn Record inputs at time of tracing, constrain to them for triton fn Jan 23, 2025
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 23, 2025 18:01 Inactive
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 23, 2025 18:01 Inactive
…iton fn"


Record input fake tensors at time of tracing and store them in the node meta. Inductor passes have the possibility of changing strides, so it is safer to record the strides of the inputs at tracing. See, #137979 for more context. 

We can also extend this to custom ops, and user-visible outputs. If this ends up being compilation time sensitive we can just record strides (and maybe storage offset, per zou3519) instead of the complete fake tensor. 


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 23, 2025 20:18 Inactive
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 23, 2025 20:18 Inactive
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@eellison your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Jan 29, 2025
…n fn (#145448)"

This reverts commit a699034.

Reverted #145448 on behalf of https://github.com/ZainRizvi due to Sorry but this is breaking internally. See D68779678 for details ([comment](#145448 (comment)))
@pytorchmergebot pytorchmergebot added Reverted ci-no-td Do not run TD on this PR labels Jan 29, 2025
@pytorch-bot
pytorch-bot Bot had a problem deploying to upload-benchmark-results January 29, 2025 18:37 Error
@pytorch-bot
pytorch-bot Bot had a problem deploying to upload-benchmark-results January 29, 2025 18:37 Error
@pytorch-bot
pytorch-bot Bot had a problem deploying to upload-benchmark-results January 29, 2025 18:37 Error
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 29, 2025 18:38 Inactive
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results January 29, 2025 18:38 Inactive
…iton fn"


Record input fake tensors at time of tracing and store them in the node meta. Inductor passes have the possibility of changing strides, so it is safer to record the strides of the inputs at tracing. See, #137979 for more context. 

We can also extend this to custom ops, and user-visible outputs. If this ends up being compilation time sensitive we can just record strides (and maybe storage offset, per zou3519) instead of the complete fake tensor. 


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang aakhundov

[ghstack-poisoned]
[ghstack-poisoned]
eellison added a commit that referenced this pull request Jan 29, 2025
@eellison

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
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

eellison added a commit that referenced this pull request Feb 25, 2025
… tracing, constrain to them for triton fn"


Resubmit of #145448. it lost its changes on rebase.


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 amjames chauhang aakhundov

[ghstack-poisoned]
eellison added a commit that referenced this pull request Feb 25, 2025
…ain to them for triton fn"


Resubmit of #145448. it lost its changes on rebase.


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 amjames chauhang aakhundov

[ghstack-poisoned]
eellison added a commit that referenced this pull request Feb 26, 2025
… tracing, constrain to them for triton fn"


Resubmit of #145448. it lost its changes on rebase.


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 amjames chauhang aakhundov

[ghstack-poisoned]
eellison added a commit that referenced this pull request Feb 26, 2025
…ain to them for triton fn"


Resubmit of #145448. it lost its changes on rebase.


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 amjames chauhang aakhundov

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Feb 26, 2025
aditew01 pushed a commit that referenced this pull request Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request fx Merged module: inductor release notes: fx release notes category Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants