KEMBAR78
[PyTorch] AOTI: cache dtypes and device types at DSO load by swolchok · Pull Request #111820 · pytorch/pytorch · GitHub
Skip to content

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Oct 23, 2023

Stack from ghstack (oldest at bottom):

Calling the aoti_torch_{device_type,dtype} functions on
each iteration can impose high costs on overhead-bound CPU models
because they can't be inlined across a DSO boundary. If we call them
on load, we can use simple load instructions at run time.

Differential Revision: D50563682

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

Calling the `aoti_torch_{device_type,dtype}` functions on
each iteration can impose high costs on overhead-bound CPU models
because they can't be inlined across a DSO boundary. If we call them
on load, we can use simple load instructions at run time.

Differential Revision: [D50563682](https://our.internmc.facebook.com/intern/diff/D50563682/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 23, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 252d891 with merge base e9422b1 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

swolchok added a commit that referenced this pull request Oct 23, 2023
Calling the `aoti_torch_{device_type,dtype}` functions on
each iteration can impose high costs on overhead-bound CPU models
because they can't be inlined across a DSO boundary. If we call them
on load, we can use simple load instructions at run time.

Differential Revision: [D50563682](https://our.internmc.facebook.com/intern/diff/D50563682/)

ghstack-source-id: 204997329
Pull Request resolved: #111820
@swolchok swolchok requested review from chenyang78 and desertfire and removed request for desertfire October 23, 2023 21:53
Copy link
Contributor

@chenyang78 chenyang78 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@swolchok
Copy link
Contributor Author

@pytorchbot merge

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

@swolchok swolchok added the topic: not user facing topic category label Oct 24, 2023
@swolchok
Copy link
Contributor 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

@facebook-github-bot facebook-github-bot deleted the gh/swolchok/592/head branch October 28, 2023 14:25
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
…1820)

Calling the `aoti_torch_{device_type,dtype}` functions on
each iteration can impose high costs on overhead-bound CPU models
because they can't be inlined across a DSO boundary. If we call them
on load, we can use simple load instructions at run time.

Differential Revision: [D50563682](https://our.internmc.facebook.com/intern/diff/D50563682/)

Pull Request resolved: pytorch#111820
Approved by: https://github.com/chenyang78, https://github.com/desertfire
ghstack dependencies: pytorch#111815, pytorch#111816
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
…1820)

Calling the `aoti_torch_{device_type,dtype}` functions on
each iteration can impose high costs on overhead-bound CPU models
because they can't be inlined across a DSO boundary. If we call them
on load, we can use simple load instructions at run time.

Differential Revision: [D50563682](https://our.internmc.facebook.com/intern/diff/D50563682/)

Pull Request resolved: pytorch#111820
Approved by: https://github.com/chenyang78, https://github.com/desertfire
ghstack dependencies: pytorch#111815, pytorch#111816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants