NVIDIA / NVIDIA/cudf

[FEA] Extend tests to ensure no memory is allocated outside of RMM

Open
#11,546 2 comments 0 reactions 0 assignees View on GitHub
feature request libcudf Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**

It is important to ensure that all device memory allocated inside of cuDF functions is done through RMM.

It is easy to overlook this, e.g., by forgetting to pass the `rmm::exec_policy` to a Thrust algorithm that allocates temporary memory.

**Describe the solution you'd like**

It would be fairly easy to add this to our CI testing by writing a LD_PRELOAD library that overloads `cudaMalloc` to throw an error if it is called more than once.

This would ensure that there is only a single `cudaMalloc` call for the pool allocation.

There are some things to be aware of with this solution:
- We'd need to ensure the pool is sized such that it won't need to grow for the tests
- It would assume we're using cudaMalloc as the upstream resource for the pool (and not cudaMallocManaged)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.