Skip to content

Commit 2a5a920

Browse files
authored
Remove host memory resources (#2149)
Removes host memory resources. Closes #2103. Closes #2090. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - David Wendt (https://github.com/davidwendt) - Vyas Ramasubramani (https://github.com/vyasr) URL: #2149
1 parent 2c4f434 commit 2a5a920

File tree

9 files changed

+20
-725
lines changed

9 files changed

+20
-725
lines changed

README.md

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ host <-> device memory transfers, or using a device memory pool sub-allocator to
1818
dynamic device memory allocation.
1919

2020
The goal of the RAPIDS Memory Manager (RMM) is to provide:
21-
- A common interface that allows customizing [device](#device_memory_resource) and
22-
[host](#host_memory_resource) memory allocation
21+
- A common interface that allows customizing memory allocation on device and host
2322
- A collection of [implementations](#available-resources) of the interface
2423
- A collection of [data structures](#device-data-structures) that use the interface for memory allocation
2524

@@ -202,13 +201,12 @@ The first goal of RMM is to provide a common interface for device and host memor
202201
This allows both _users_ and _implementers_ of custom allocation logic to program to a single
203202
interface.
204203

205-
To this end, RMM defines two abstract interface classes:
206-
- [`rmm::mr::device_memory_resource`](#device_memory_resource) for device memory allocation
207-
- [`rmm::mr::host_memory_resource`](#host_memory_resource) for host memory allocation
204+
To this end, RMM defines the abstract interface class [`rmm::mr::device_memory_resource`](#device_memory_resource) for device memory allocation.
208205

209-
These classes are based on the
210-
[`std::pmr::memory_resource`](https://en.cppreference.com/w/cpp/memory/memory_resource) interface
211-
class introduced in C++17 for polymorphic memory allocation.
206+
RMM is in the process of migrating to a design based on [CCCL's memory
207+
resource](https://nvidia.github.io/cccl/libcudacxx/extended_api/memory_resource.html).
208+
This design is based on concepts rather than inheritance from a virtual base
209+
class. The RMM documentation will be updated as this progresses.
212210

213211
## `device_memory_resource`
214212

@@ -554,42 +552,6 @@ kernel<<<...,s.value()>>>(a.data()); // Pass raw pointer to underlying element i
554552
int32_t v = a.value(s); // Retrieves the value from device to host on stream `s`
555553
```
556554
557-
## `host_memory_resource`
558-
559-
> **⚠️ DEPRECATED in 25.12**: `host_memory_resource`, `pinned_memory_resource`, and `new_delete_resource` are deprecated and will be removed in 26.02. Use `pinned_host_memory_resource` instead for pinned host memory allocations.
560-
561-
`rmm::mr::host_memory_resource` is the base class that defines the interface for allocating and
562-
freeing host memory.
563-
564-
Similar to `device_memory_resource`, it has two key functions for (de)allocation:
565-
566-
1. `void* host_memory_resource::allocate(std::size_t bytes, std::size_t alignment)`
567-
- Returns a pointer to an allocation of at least `bytes` bytes aligned to the specified
568-
`alignment`
569-
570-
2. `void host_memory_resource::deallocate(void* p, std::size_t bytes, std::size_t alignment)`
571-
- Reclaims a previous allocation of size `bytes` pointed to by `p`.
572-
573-
574-
Unlike `device_memory_resource`, the `host_memory_resource` interface and behavior is identical to
575-
`std::pmr::memory_resource`.
576-
577-
## Available Host Resources
578-
579-
### `new_delete_resource`
580-
581-
Uses the global `operator new` and `operator delete` to allocate host memory.
582-
583-
### `pinned_memory_resource`
584-
585-
Allocates "pinned" host memory using `cuda(Malloc/Free)Host`.
586-
587-
## Host Data Structures
588-
589-
RMM does not currently provide any data structures that interface with `host_memory_resource`.
590-
In the future, RMM will provide a similar host-side structure like `device_buffer` and an allocator
591-
that can be used with STL containers.
592-
593555
## Using RMM with Thrust
594556
595557
RAPIDS and other CUDA libraries make heavy use of Thrust. Thrust uses CUDA device memory in two

cpp/include/doxygen_groups.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
/**
4141
* @defgroup memory_resources Memory Resources
4242
* @defgroup memory_resource_adaptors Memory Resource Adaptors
43-
* @defgroup host_memory_resources Host Memory Resources
4443
* @defgroup cuda_device_management CUDA Device Management
4544
* @defgroup cuda_streams CUDA Streams
4645
* @defgroup data_containers Data Containers

cpp/include/rmm/mr/host/host_memory_resource.hpp

Lines changed: 0 additions & 259 deletions
This file was deleted.

0 commit comments

Comments
 (0)