Description
Is your feature request related to a problem? Please describe.
The Java bindings require explicit close()
calls by the caller to prevent GPU OOM errors if garbage collection doesn't kick in often enough to free unreferenced Java objects wrapping GPU resources in a timely manner. We currently have leaked object tracking via weak reference collection events for most GPU resources, but that does not currently cover Scalar
instances which wrap cudf::scalar
.
Describe the solution you'd like
The same leak tracking and debugging done for ColumnVector
should be applied to Scalar
. Although Scalar
instances are not very large in practice (excluding the corner cases of nested type scalars), they can fragment the GPU memory pool drastically if there are enough of these tiny allocations leaked, causing GPU OOM errors much earlier than one would expect.