-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[XPU] call empty_cache for dynamo tests #126377
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/126377
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 56a7d2e with merge base d0dfcd2 (): 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. |
benchmarks/dynamo/common.py
Outdated
), "The empty_gpu_cache needs to be called with a non empty device str" | ||
if device == "cuda": | ||
torch.cuda.empty_cache() | ||
if device == "xpu": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: elif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! Solved in 56a7d2e
@pytorchbot merge |
Merge startedYour 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 |
Summary: When running a batch of models, lacking `empty_cache()` would result in OOM for subsequent models. This PR unifies the `empty_cache` call for both CUDA and XPU. X-link: pytorch/pytorch#126377 Approved by: https://github.com/EikanWang, https://github.com/guangyey, https://github.com/desertfire Reviewed By: huydhn Differential Revision: D57518757 fbshipit-source-id: a42ae31e7fb81bb05217fd672a3427bd68478a50
When running a batch of models, lacking `empty_cache()` would result in OOM for subsequent models. This PR unifies the `empty_cache` call for both CUDA and XPU. Pull Request resolved: pytorch#126377 Approved by: https://github.com/EikanWang, https://github.com/guangyey, https://github.com/desertfire
When running a batch of models, lacking
empty_cache()
would result in OOM for subsequent models.This PR unifies the
empty_cache
call for both CUDA and XPU.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang