mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #190] empty every clip related data from VRAM #168
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @crasse2 on GitHub (Nov 30, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/190
Hi There !
let's say I load your model to the GPU using those commands :
it load around 1 GB of data to the cuda device.
How would I do to totally free those 1 GB ?
I tried
but it only remove around 300 MB of data (and so 700 MB are still occupying the GPU ram)
is it possible to remove everything with a certain python command ?
@jongwook commented on GitHub (Dec 3, 2021):
There could be other things remaining on the VRAM that we can't fully control, such as optimized CUDA kernels. If you absolutely need to release the VRAM, I'd recommend running your job on a subprocess, so that it can release all VRAM allocations upon exit.
@crasse2 commented on GitHub (Dec 3, 2021):
Hi ! thanks for your answer !
yeah I was considering subprocess/external call or right now i'm trying to flush everything by resetting the device with numba/cuda (didn't found out how to restart and repopulate the cuda device after resetting it within a notebook)
anyway, thanks for sharing the clip model, it's a trully amazing one !