Memory Resource Management#

group Memory Resource Management

Functions

inline rmm::device_async_resource_ref get_current_device_resource_ref()#

Get the current device memory resource reference.

Returns:

The current device memory resource reference.

inline cuda::mr::any_resource<cuda::mr::device_accessible> set_current_device_resource(cuda::mr::any_resource<cuda::mr::device_accessible> mr)#

Set the current device memory resource.

Parameters:

mr – The new device memory resource.

Returns:

An owning any_resource holding the previous resource.

inline cuda::mr::any_resource<cuda::mr::device_accessible> set_current_device_resource_ref(rmm::device_async_resource_ref mr)#

Set the current device memory resource reference.

Deprecated:

Use set_current_device_resource instead.

The object referenced by mr must outlive the last use of the resource, otherwise behavior is undefined. It is the caller’s responsibility to maintain the lifetime of the resource object.

Parameters:

mr – The new device memory resource reference.

Returns:

An owning any_resource holding the previous resource.

inline cuda::mr::any_resource<cuda::mr::device_accessible> reset_current_device_resource()#

Reset the current device memory resource to the initial resource.

Returns:

An owning any_resource holding the previous resource.

inline cuda::mr::any_resource<cuda::mr::device_accessible> reset_current_device_resource_ref()#

Reset the current device memory resource reference to the initial resource.

Deprecated:

Use reset_current_device_resource instead.

Returns:

An owning any_resource holding the previous resource.