-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add pytorch_cuda_alloc_conf
config to tune VRAM memory allocation
#7673
Conversation
e7ff9d7
to
76430cb
Compare
As confirmation, i presume this does not play nicely on AMD? |
I haven't tested on AMD, but I would not expect the recommended config of |
9ba2713
to
1e2c7c5
Compare
6469f42
to
61cce5a
Compare
… config field that allows full customization of the CUDA allocator.
…mported() to only run if CUDA is available.
96430db
to
0e632db
Compare
Summary
This PR adds a
pytorch_cuda_alloc_conf
config flag to control the torch memory allocator behavior.pytorch_cuda_alloc_conf
defaults toNone
, preserving the current behavior.pytorch_cuda_alloc_conf: "backend:cudaMallocAsync"
ininvokeai.yaml
is expected to work well on many systems. This is a good first step for those looking to tune this config. (We may make this the default in the future.)Memory Tests
Related Issues / Discussions
N/A
QA Instructions
pytorch_cuda_alloc_conf
unset.pytorch_cuda_alloc_conf: "backend:cudaMallocAsync"
.Merge Plan
main
Checklist
What's New
copy (if doing a release after this PR)