KEMBAR78
[PyTorch] AOTI: use array of constants by swolchok · Pull Request #111815 · pytorch/pytorch · GitHub
Skip to content

Conversation

@swolchok
Copy link
Contributor

@swolchok swolchok commented Oct 23, 2023

Stack from ghstack (oldest at bottom):

We continue to allow the user to set clients with a map, but under the hood we use an array of constants.

model_container thought it was OK to hand over the map, assume we just
kept a pointer, and then mutate the map later; I had to fix that. I
hope there aren't other sites that do the same thing...

Differential Revision: D50111512

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

We continue to allow the user to set clients with a map, but under the hood we use an array of constants.

model_container thought it was OK to hand over the map, assume we just
kept a pointer, and then mutate the map later; I had to fix that. I
hope there aren't other sites that do the same thing...

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

[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/111815

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 ec427f3 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.

We continue to allow the user to set clients with a map, but under the hood we use an array of constants.

model_container thought it was OK to hand over the map, assume we just
kept a pointer, and then mutate the map later; I had to fix that. I
hope there aren't other sites that do the same thing...

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

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

[ghstack-poisoned]
@swolchok swolchok added the topic: not user facing topic category label Oct 24, 2023
pytorchmergebot pushed a commit that referenced this pull request Oct 24, 2023
The OSS selection mechanism does not work internally, and doesn't make sense when the machine building the .so and the machine executing it may be different anyway.

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

Pull Request resolved: #111816
Approved by: https://github.com/jansel, https://github.com/msaroufim
ghstack dependencies: #111815
pytorchmergebot pushed a commit that referenced this pull request Oct 24, 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/)

Pull Request resolved: #111820
Approved by: https://github.com/chenyang78, https://github.com/desertfire
ghstack dependencies: #111815, #111816
@facebook-github-bot facebook-github-bot deleted the gh/swolchok/590/head branch October 28, 2023 14:25
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
We continue to allow the user to set clients with a map, but under the hood we use an array of constants.

model_container thought it was OK to hand over the map, assume we just
kept a pointer, and then mutate the map later; I had to fix that. I
hope there aren't other sites that do the same thing...

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

Pull Request resolved: pytorch#111815
Approved by: https://github.com/jansel, https://github.com/desertfire
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
The OSS selection mechanism does not work internally, and doesn't make sense when the machine building the .so and the machine executing it may be different anyway.

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

Pull Request resolved: pytorch#111816
Approved by: https://github.com/jansel, https://github.com/msaroufim
ghstack dependencies: pytorch#111815
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
We continue to allow the user to set clients with a map, but under the hood we use an array of constants.

model_container thought it was OK to hand over the map, assume we just
kept a pointer, and then mutate the map later; I had to fix that. I
hope there aren't other sites that do the same thing...

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

Pull Request resolved: pytorch#111815
Approved by: https://github.com/jansel, https://github.com/desertfire
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
The OSS selection mechanism does not work internally, and doesn't make sense when the machine building the .so and the machine executing it may be different anyway.

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

Pull Request resolved: pytorch#111816
Approved by: https://github.com/jansel, https://github.com/msaroufim
ghstack dependencies: pytorch#111815
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants