Using RMM library in C++ code

I am trying to use the RMM from RAPID for my C/C++ application. The blog and GitHub are good places for me to start with:

  2. GitHub - rapidsai/rmm: RAPIDS Memory Manager

After reading them, I am still confused about stream ordered allocation with RMM. For example, cuda_memory_resource is a derived class from device_memory_resource where memory allocation is done by cudaMalloc and cudaFree. In the article, it says all device_memory_resource MRs take a stream parameter for stream ordered allocation. As a derived class of device_memory_resource, cuda_memory_resource uses cudaMalloc other than cudaMallocAsyn. How can it be stream ordered then?

Also, I am trying to use pool_memory_resource as suggested:

rmm::mr::cuda_memory_resource cuda_mr;
rmm::mr::pool_memory_resource<rmm::mr::cuda_memory_resource> pool_mr{&cuda_mr};
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource();

However, the code is crashed. I am wondering if I am not using pool_memory_resource in the right way.

You should ask in RAPIDS-GoAi Slack

Thanks for the information. I will post the question at the slack.