You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
Basically, something like #226, but more careful and with actual uses in CuArrays.jl. Some backstory.
We now depend on the Julia GC to collect CuArray objects before they end up in the pool again. This is not optimal, and compounded by the fact that the Julia GC doens't know about the GPU's memory pressure. As a result, we kind-of rely on hitting a GPU OOM before collecting dead arrays and putting them back into the pool:
throw(ArgumentError("The $(info)th parameter is wrong"))
end
A, tau
One option is to call finalize, but that is a pretty slow call and shouldn't be used in performance critical code. Instead, we should have a call to eagerly "free" objects (from the perspective of CuArrays.jl) and put them back into the pool. For example, the geqrf! method above would then free its buffer before returning. To prevent use of early-freed arrays, we should probably wipe the memory buffer handle (eg. set to NULL or some other sentinel value). Care should be taken to deal with ownership (not support this call when we don't own the CuArray? make sure the CUDAdrv refcount is 1?).
The text was updated successfully, but these errors were encountered:
Basically, something like #226, but more careful and with actual uses in CuArrays.jl. Some backstory.
We now depend on the Julia GC to collect
CuArray
objects before they end up in the pool again. This is not optimal, and compounded by the fact that the Julia GC doens't know about the GPU's memory pressure. As a result, we kind-of rely on hitting a GPU OOM before collecting dead arrays and putting them back into the pool:CuArrays.jl/src/memory.jl
Lines 254 to 256 in 8525a9d
On the other hand, we often know that arrays are unused and could be put back into the pool again. For example:
CuArrays.jl/src/solver/dense.jl
Lines 126 to 138 in 0384d25
One option is to call
finalize
, but that is a pretty slow call and shouldn't be used in performance critical code. Instead, we should have a call to eagerly "free" objects (from the perspective of CuArrays.jl) and put them back into the pool. For example, thegeqrf!
method above would then free itsbuffer
before returning. To prevent use of early-freed arrays, we should probably wipe the memory buffer handle (eg. set to NULL or some other sentinel value). Care should be taken to deal with ownership (not support this call when we don't own theCuArray
? make sure the CUDAdrv refcount is 1?).The text was updated successfully, but these errors were encountered: