Package ai.rapids.cudf
Class RmmArenaMemoryResource<C extends RmmDeviceMemoryResource>
java.lang.Object
ai.rapids.cudf.RmmWrappingDeviceMemoryResource<C>
ai.rapids.cudf.RmmArenaMemoryResource<C>
- All Implemented Interfaces:
RmmDeviceMemoryResource
,AutoCloseable
public class RmmArenaMemoryResource<C extends RmmDeviceMemoryResource>
extends RmmWrappingDeviceMemoryResource<C>
A device memory resource that will pre-allocate a pool of resources and sub-allocate from this
pool to improve memory performance. This uses an algorithm to try and reduce fragmentation
much more than the RmmPoolMemoryResource does.
-
Field Summary
Fields inherited from class ai.rapids.cudf.RmmWrappingDeviceMemoryResource
wrapped
-
Constructor Summary
ConstructorsConstructorDescriptionRmmArenaMemoryResource
(C wrapped, long size, boolean dumpLogOnFailure) Create a new arena memory resource taking ownership of the RmmDeviceMemoryResource that it is wrapping. -
Method Summary
Methods inherited from class ai.rapids.cudf.RmmWrappingDeviceMemoryResource
getWrapped, releaseWrapped
-
Constructor Details
-
RmmArenaMemoryResource
Create a new arena memory resource taking ownership of the RmmDeviceMemoryResource that it is wrapping.- Parameters:
wrapped
- the memory resource to use for the pool. This should not be reused.size
- the size of the pooldumpLogOnFailure
- if true, dump memory log when running out of memory.
-
-
Method Details
-
getHandle
public long getHandle()Description copied from interface:RmmDeviceMemoryResource
Returns a pointer to the underlying C++ class that implements rmm::mr::device_memory_resource -
getSize
public long getSize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRmmDeviceMemoryResource
- Overrides:
close
in classRmmWrappingDeviceMemoryResource<C extends RmmDeviceMemoryResource>
-
toString
-