Skip to content

[dynamo] config guard cache size limit#111145

Closed
jon-chuang wants to merge 29 commits intopytorch:mainfrom
jon-chuang:jon-chuang/config-guard-cache-size-limit
Closed

[dynamo] config guard cache size limit#111145
jon-chuang wants to merge 29 commits intopytorch:mainfrom
jon-chuang:jon-chuang/config-guard-cache-size-limit

Conversation

@jon-chuang
Copy link
Collaborator

@jon-chuang jon-chuang commented Oct 12, 2023

Follow up to: #111074

CacheEntry are stored on f's __code__ object. We simply change the way of counting the cache size limit

cc @voznesenskym @ezyang @Chillee

@jon-chuang jon-chuang requested a review from a team as a code owner October 12, 2023 16:58
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 12, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit e925c25 with merge base 918054f (image):
💚 Looks good so far! There are no failures yet. 💚

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

@github-actions
Copy link
Contributor

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.

@jon-chuang jon-chuang marked this pull request as draft October 12, 2023 16:59
@jon-chuang jon-chuang marked this pull request as ready for review October 12, 2023 16:59
@jon-chuang jon-chuang marked this pull request as draft October 12, 2023 16:59
@jon-chuang
Copy link
Collaborator Author

@pytorchbot label "release notes: dynamo"

@ezyang
Copy link
Contributor

ezyang commented Oct 13, 2023

since this isn't stacked I can't easily review it, removing from queue for now

@jon-chuang
Copy link
Collaborator Author

@ezyang would it be possible to get branch creation permission on this repo?

Running ghstack:
remote: Permission to pytorch/pytorch.git denied to jon-chuang.

@ezyang
Copy link
Contributor

ezyang commented Oct 13, 2023

i sent you a gh invite

@jon-chuang jon-chuang mentioned this pull request Oct 14, 2023
4 tasks
@jon-chuang jon-chuang closed this Oct 14, 2023
@jon-chuang jon-chuang mentioned this pull request Oct 14, 2023
4 tasks
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
jon-chuang added a commit that referenced this pull request Oct 14, 2023
---

Fixes: #110682

Replaces: #111074

The guards are installed based on config that is valid at the call to `torch.compile`, rather than at any subsequent call / triggered compilation. Subsequent compilations will restore the config if there is a config mismatch with the saved config.

TODO:
- [X] add tests

Follow up PRs:
- [x] add revised cache size computation (follow up PR: #111145, based on: #107496) 
- [ ] handle run-only mode?
- [ ] config restoration itself is not thread-safe (tracked: #111150)

cc voznesenskym ezyang Chillee


[ghstack-poisoned]
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.

3 participants