KEMBAR78
[dynamo] attempt run only mode when dynamo cache limit is hit by williamwen42 · Pull Request #136655 · pytorch/pytorch · GitHub
Skip to content

Conversation

@williamwen42
Copy link
Member

@williamwen42 williamwen42 commented Sep 25, 2024

Stack from ghstack (oldest at bottom):

Implement #135458.

Try run-only mode when dynamo cache limit is hit. If no valid cache entries are found, then skip code recursively.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @rec

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 25, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1369a0c with merge base b7a5c7d (image):
💚 Looks good so far! There are no failures yet. 💚

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

@bhack
Copy link
Contributor

bhack commented Sep 25, 2024

To summarize Is this N (the cache limit limit) + 1 the cache hit test?

@williamwen42
Copy link
Member Author

@bhack please clarify what you mean?

@bhack
Copy link
Contributor

bhack commented Sep 25, 2024

Is run only just an extra step for cache hit check after the recompilation limit is exhausted? Or is it something else?

@williamwen42
Copy link
Member Author

Run only mode is where we do not ever trace bytecode. We try to run previously compiled code and if all guard checks for previously compiled code fail, we run eager. In the case that cache limit is hit and there is no valid previously compiled code, we also disable the eval frame callback so we skip tracing any recursive calls.

…hit"


Implement #135458.

Try run-only mode when dynamo cache limit is hit. If no valid cache entries are found, then skip code recursively.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Sep 25, 2024
…hit"


Implement #135458.

Try run-only mode when dynamo cache limit is hit. If no valid cache entries are found, then skip code recursively.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Sep 26, 2024
@williamwen42 williamwen42 added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 26, 2024
@williamwen42
Copy link
Member 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

@anijain2305
Copy link
Contributor

anijain2305 commented Sep 29, 2024

Just to understand. Earlier, if we hit cache size limit, we fully go back to eager.
Now at runtime, we will still try to use those compiled 8 graphs. But if there is a recompilation, we decide to recursively skip. If yes, this is definitely an improvement. Thanks for the fix.

@github-actions github-actions bot deleted the gh/williamwen42/139/head branch November 3, 2024 02:11
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.

5 participants