Package ai.rapids.cudf
Class RmmCudaAsyncMemoryResource
java.lang.Object
ai.rapids.cudf.RmmCudaAsyncMemoryResource
- All Implemented Interfaces:
RmmDeviceMemoryResource,AutoCloseable
A device memory resource that uses `cudaMallocAsync` and `cudaFreeAsync` for allocation and
deallocation.
-
Constructor Summary
ConstructorsConstructorDescriptionRmmCudaAsyncMemoryResource(long size, long releaseThreshold) Create a new async memory resourceRmmCudaAsyncMemoryResource(long size, long releaseThreshold, boolean fabric) Create a new async memory resource -
Method Summary
-
Constructor Details
-
RmmCudaAsyncMemoryResource
public RmmCudaAsyncMemoryResource(long size, long releaseThreshold) Create a new async memory resource- Parameters:
size- the initial size of the poolreleaseThreshold- size in bytes for when memory is released back to cuda
-
RmmCudaAsyncMemoryResource
public RmmCudaAsyncMemoryResource(long size, long releaseThreshold, boolean fabric) Create a new async memory resource- Parameters:
size- the initial size of the poolreleaseThreshold- size in bytes for when memory is released back to cudafabric- if true request peer read+write accessible fabric handles when creating the pool
-
-
Method Details
-
getHandle
public long getHandle()Description copied from interface:RmmDeviceMemoryResourceReturns a pointer to the underlying C++ class that implements rmm::mr::device_memory_resource- Specified by:
getHandlein interfaceRmmDeviceMemoryResource
-
getSize
public long getSize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRmmDeviceMemoryResource
-
toString
-