Open
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct
Area
cuda.core
Is your feature request related to a problem? Please describe.
@realarnavgoel brought up this issue offline that we currently have a fallback weak finalizer
in case users forget to explicitly call
.close()
to free the memory. This could interfere with projects such as nvmath-python and nvSHMEM who require explicit control over the buffer lifetime and deallocation timing.
Describe the solution you'd like
We discussed offline and came up with this proposal that we'll add a .release()
method to the buffer object. The idea is that if it is called, the weak finalizer will be unregistered, so that the only way to free the buffer is to call .close()
explicitly later.
Describe alternatives you've considered
No response
Additional context
No response