8 #include <rmm/detail/export.hpp>
9 #include <rmm/mr/detail/cuda_async_memory_resource_impl.hpp>
11 #include <cuda/memory_resource>
12 #include <cuda_runtime_api.h>
18 namespace RMM_NAMESPACE {
31 :
public cuda::mr::shared_resource<detail::cuda_async_memory_resource_impl> {
32 using shared_base = cuda::mr::shared_resource<detail::cuda_async_memory_resource_impl>;
48 none = cudaMemHandleTypeNone,
49 posix_file_descriptor =
50 cudaMemHandleTypePosixFileDescriptor,
53 cudaMemHandleTypeWin32,
54 win32_kmt = cudaMemHandleTypeWin32Kmt,
79 cuda::mr::device_accessible) noexcept
103 std::optional<std::size_t> release_threshold = {},
104 std::optional<allocation_handle_type> export_handle_type = {});
Memory resource that uses cudaMallocAsync/cudaFreeAsync for allocation/deallocation.
Definition: cuda_async_memory_resource.hpp:31
allocation_handle_type
Flags for specifying memory allocation handle types.
Definition: cuda_async_memory_resource.hpp:47
friend void get_property(cuda_async_memory_resource const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition: cuda_async_memory_resource.hpp:78
cuda_async_memory_resource(std::optional< std::size_t > initial_pool_size={}, std::optional< std::size_t > release_threshold={}, std::optional< allocation_handle_type > export_handle_type={})
Constructs a cuda_async_memory_resource with the optionally specified initial pool size and release t...
mempool_usage
Flags for specifying memory pool usage.
Definition: cuda_async_memory_resource.hpp:70
cudaMemPool_t pool_handle() const noexcept
Returns the underlying native handle to the CUDA pool.