Skip to content

Commit e8e6899

Browse files
authored
Reorganize buffer/memory code (#673)
No change in semantic, only moving files and functions around: ``` rapidsmpf/buffer/ => rapidsmpf/memory/ move MemoryReservation to its own file rapidsmpf/buffer/memory_reservation.hpp rapidsmpf/buffer/resource.hpp => rapidsmpf/buffer/buffer_resource.hpp ``` Merge rapidsai/cudf#20665 afterwards Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Peter Andreas Entschev (https://github.com/pentschev) - Lawrence Mitchell (https://github.com/wence-) URL: #673
1 parent 756c575 commit e8e6899

File tree

119 files changed

+474
-407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+474
-407
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Example of a MPI program that uses the shuffler:
107107
#include <mpi.h>
108108
#include <unistd.h>
109109

110-
#include <rapidsmpf/buffer/packed_data.hpp>
110+
#include <rapidsmpf/memory/packed_data.hpp>
111111
#include <rapidsmpf/communicator/mpi.hpp>
112112
#include <rapidsmpf/error.hpp>
113113
#include <rapidsmpf/integrations/cudf/partition.hpp>

cpp/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ add_library(
159159
src/allgather/allgather.cpp
160160
src/bootstrap/bootstrap.cpp
161161
src/bootstrap/file_backend.cpp
162-
src/buffer/buffer.cpp
163-
src/buffer/pinned_memory_resource.cu
164-
src/buffer/resource.cpp
165-
src/buffer/spill_manager.cpp
166162
src/communicator/communicator.cpp
167163
src/communicator/metadata_payload_exchange/core.cpp
168164
src/communicator/metadata_payload_exchange/tag.cpp
@@ -171,6 +167,11 @@ add_library(
171167
src/cuda_event.cpp
172168
src/integrations/cudf/partition.cpp
173169
src/integrations/cudf/utils.cpp
170+
src/memory/buffer.cpp
171+
src/memory/buffer_resource.cpp
172+
src/memory/memory_reservation.cpp
173+
src/memory/pinned_memory_resource.cu
174+
src/memory/spill_manager.cpp
174175
src/pausable_thread_loop.cpp
175176
src/progress_thread.cpp
176177
src/rmm_resource_adaptor.cpp

cpp/benchmarks/bench_memory_resources.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include <rmm/mr/cuda_memory_resource.hpp>
1414
#include <rmm/mr/pinned_host_memory_resource.hpp>
1515

16-
#include <rapidsmpf/buffer/pinned_memory_resource.hpp>
1716
#include <rapidsmpf/error.hpp>
17+
#include <rapidsmpf/memory/pinned_memory_resource.hpp>
1818

1919
namespace {
2020
class HostMemoryResource {

cpp/benchmarks/utils/random_data.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <cudf/table/table.hpp>
99
#include <cudf/types.hpp>
1010

11-
#include <rapidsmpf/buffer/buffer.hpp>
11+
#include <rapidsmpf/memory/buffer.hpp>
1212

1313

1414
/**

cpp/compute-sanitizer-suppressions.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@
101101
<frame></frame>
102102
<frame>
103103
<func>rapidsmpf::buffer_copy</func>
104-
<path>.*/buffer/buffer.cpp</path>
104+
<path>.*/memory/buffer.cpp</path>
105105
<module>.*/librapidsmpf.so</module>
106106
</frame>
107107
<frame>
108108
<func>rapidsmpf::BufferResource::move</func>
109-
<path>.*/buffer/resource.cpp</path>
109+
<path>.*/memory/buffer_resource.cpp</path>
110110
<module>.*/librapidsmpf.so</module>
111111
</frame>
112112
<frame>
@@ -184,7 +184,7 @@
184184
</frame>
185185
<frame>
186186
<func>rapidsmpf::buffer_copy const</func>
187-
<path>.*/buffer/buffer.cpp</path>
187+
<path>.*/memory/buffer.cpp</path>
188188
<module>.*/librapidsmpf.so</module>
189189
</frame>
190190
<frame></frame>
@@ -193,12 +193,12 @@
193193
<frame></frame>
194194
<frame>
195195
<func>rapidsmpf::buffer_copy</func>
196-
<path>.*/buffer/buffer.cpp</path>
196+
<path>.*/memory/buffer.cpp</path>
197197
<module>/.*/librapidsmpf.so</module>
198198
</frame>
199199
<frame>
200200
<func>rapidsmpf::BufferResource::move</func>
201-
<path>.*/buffer/resource.cpp</path>
201+
<path>.*/memory/buffer_resource.cpp</path>
202202
<module>/.*/librapidsmpf.so</module>
203203
</frame>
204204
<frame>
@@ -231,7 +231,7 @@
231231
</frame>
232232
<frame>
233233
<func>rapidsmpf::buffer_copy const</func>
234-
<path>.*/buffer/buffer.cpp</path>
234+
<path>.*/memory/buffer.cpp</path>
235235
<module>.*/librapidsmpf.so</module>
236236
</frame>
237237
<frame>
@@ -251,17 +251,17 @@
251251
</frame>
252252
<frame>
253253
<func>std::invoke_result&lt;rapidsmpf::buffer_copy</func>
254-
<path>*/buffer/buffer.hpp</path>
254+
<path>*/memory/buffer.hpp</path>
255255
<module>.*/librapidsmpf.so</module>
256256
</frame>
257257
<frame>
258258
<func>rapidsmpf::buffer_copy</func>
259-
<path>.*/buffer/buffer.cpp</path>
259+
<path>.*/memory/buffer.cpp</path>
260260
<module>.*/librapidsmpf.so</module>
261261
</frame>
262262
<frame>
263263
<func>rapidsmpf::BufferResource::move</func>
264-
<path>.*/buffer/resource.cpp</path>
264+
<path>.*/memory/buffer_resource.cpp</path>
265265
<module>.*/librapidsmpf.so</module>
266266
</frame>
267267
<frame>

cpp/examples/example_shuffle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include <mpi.h>
99
#include <unistd.h>
1010

11-
#include <rapidsmpf/buffer/packed_data.hpp>
1211
#include <rapidsmpf/communicator/mpi.hpp>
1312
#include <rapidsmpf/error.hpp>
1413
#include <rapidsmpf/integrations/cudf/partition.hpp>
14+
#include <rapidsmpf/memory/packed_data.hpp>
1515
#include <rapidsmpf/shuffler/shuffler.hpp>
1616
#include <rapidsmpf/statistics.hpp>
1717

cpp/include/rapidsmpf/allgather/allgather.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
#include <rmm/cuda_stream_view.hpp>
1919

20-
#include <rapidsmpf/buffer/buffer.hpp>
21-
#include <rapidsmpf/buffer/packed_data.hpp>
22-
#include <rapidsmpf/buffer/resource.hpp>
23-
#include <rapidsmpf/buffer/spill_manager.hpp>
2420
#include <rapidsmpf/communicator/communicator.hpp>
2521
#include <rapidsmpf/error.hpp>
22+
#include <rapidsmpf/memory/buffer.hpp>
23+
#include <rapidsmpf/memory/buffer_resource.hpp>
24+
#include <rapidsmpf/memory/packed_data.hpp>
25+
#include <rapidsmpf/memory/spill_manager.hpp>
2626
#include <rapidsmpf/progress_thread.hpp>
2727
#include <rapidsmpf/statistics.hpp>
2828

cpp/include/rapidsmpf/communicator/communicator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
#include <unordered_map>
1313
#include <vector>
1414

15-
#include <rapidsmpf/buffer/buffer.hpp>
16-
#include <rapidsmpf/buffer/resource.hpp>
1715
#include <rapidsmpf/config.hpp>
1816
#include <rapidsmpf/error.hpp>
17+
#include <rapidsmpf/memory/buffer.hpp>
18+
#include <rapidsmpf/memory/buffer_resource.hpp>
1919

2020
/**
2121
* @namespace rapidsmpf

cpp/include/rapidsmpf/communicator/metadata_payload_exchange/core.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#include <unordered_map>
1212
#include <vector>
1313

14-
#include <rapidsmpf/buffer/buffer.hpp>
15-
#include <rapidsmpf/buffer/resource.hpp>
1614
#include <rapidsmpf/communicator/communicator.hpp>
15+
#include <rapidsmpf/memory/buffer.hpp>
16+
#include <rapidsmpf/memory/buffer_resource.hpp>
1717
#include <rapidsmpf/statistics.hpp>
1818

1919
namespace rapidsmpf::communicator {

cpp/include/rapidsmpf/communicator/metadata_payload_exchange/tag.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#include <unordered_map>
1111
#include <vector>
1212

13-
#include <rapidsmpf/buffer/buffer.hpp>
1413
#include <rapidsmpf/communicator/communicator.hpp>
1514
#include <rapidsmpf/communicator/metadata_payload_exchange/core.hpp>
15+
#include <rapidsmpf/memory/buffer.hpp>
1616
#include <rapidsmpf/statistics.hpp>
1717

1818
namespace rapidsmpf::communicator {

0 commit comments

Comments
 (0)