[FEA] Leak tracking for Java Scalar instances #8227
Labels
cuDF (Java)
Affects Java cuDF API.
feature request
New feature or request
helps: Spark
Functionality that helps Spark RAPIDS
Projects
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 coverScalar
instances which wrapcudf::scalar
.Describe the solution you'd like
The same leak tracking and debugging done for
ColumnVector
should be applied toScalar
. AlthoughScalar
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.The text was updated successfully, but these errors were encountered: