-
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
base: ryan/tidy-entry
Are you sure you want to change the base?
Conversation
… config field that allows full customization of the CUDA allocator.
e7ff9d7
to
76430cb
Compare
…mported() to only run if CUDA is available.
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 |
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)