Commit 5a29a5a
authored
Add
Changes in this PR:
- Adds a Python API for `BufferResource.memory_available`.
- ~Adds an additional `BufferResource.device_memory_available` API for convenience.~
- Adds test coverage to `test_buffer_resource.py`
**Background**: I've been experimenting with spilling improvements in cudf-polars (e.g. rapidsai#489). While prototyping next steps, I found myself needing to query the amount of available device memory within a cudf-polars task. As far as I can tell, this is not currently possible, because we do not have access to the `LimitAvailableMemory` object used to construct the workers `BufferResource`. Therefore, we need bindings for `BufferResource.memory_available` to get this information from the `BufferResource` itself (Please do let me know if I'm mistaken about this).
**Note**: My Cython skills are limited, so feel free to suggest dramatic changes :)
Authors:
- Richard (Rick) Zamora (https://github.com/rjzamora)
Approvers:
- Mads R. B. Kristensen (https://github.com/madsbk)
URL: rapidsai#495BufferResource.memory_available Python API (rapidsai#495)1 parent d939029 commit 5a29a5a
File tree
4 files changed
+33
-0
lines changed- python/rapidsmpf/rapidsmpf
- buffer
- tests
4 files changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
| |||
121 | 132 | | |
122 | 133 | | |
123 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
124 | 146 | | |
125 | 147 | | |
126 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
0 commit comments