Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide explicit pool size and avoid RMM detail APIs #14741

Merged

Conversation

harrism
Copy link
Member

@harrism harrism commented Jan 11, 2024

This PR fixes up cuDF to avoid usage that will soon be deprecated in RMM.

Depends on rapidsai/rmm#1417

Fixes #14658

@harrism harrism requested a review from a team as a code owner January 11, 2024 01:51
@harrism harrism self-assigned this Jan 11, 2024
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Jan 11, 2024
@harrism harrism added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change and removed libcudf Affects libcudf (C++/CUDA) code. labels Jan 11, 2024
@@ -33,7 +34,8 @@ inline auto make_pool_instance()
{
static rmm::mr::cuda_memory_resource cuda_mr;
static auto pool_mr =
std::make_shared<rmm::mr::pool_memory_resource<rmm::mr::cuda_memory_resource>>(&cuda_mr);
std::make_shared<rmm::mr::pool_memory_resource<rmm::mr::cuda_memory_resource>>(
&cuda_mr, rmm::percent_of_free_device_memory(50));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking about whether we should parse percent_of_free_device_memory from some env variable, instead of hard coding like this in many places. By doing so we can control the number we want at runtime.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is just fixing cuDF so that it has the same behavior, and doesn't break when I merge upcoming deprecation PRs. I will file a cuDF issue for this request, but I think the cuDF team should handle it.

@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Jan 15, 2024
Copy link
Member

@PointKernel PointKernel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harrism
Copy link
Member Author

harrism commented Jan 16, 2024

/merge

@harrism
Copy link
Member Author

harrism commented Jan 16, 2024

Thanks for the reviews @ttnghia @PointKernel

@rapids-bot rapids-bot bot merged commit 8f5e64d into rapidsai:branch-24.02 Jan 17, 2024
66 of 67 checks passed
rapids-bot bot pushed a commit to rapidsai/rmm that referenced this pull request Jan 17, 2024
…ilities, and optional pool_memory_resource initial size (#1424)

Follow-on to #1417, this PR deprecates the following:

 - `rmm::detail::available_device_memory` in favor of rmm::available_device_memory
 - `rmm::detail::is_aligned`, `rmm::detail::align_up` and related alignment utility functions in favor of the `rmm::` top level namespace versions.
 - The `rmm::pool_memory_resource` constructors that take an optional initial size parameter.

Should be merged after the following:
 - rapidsai/cugraph#4086
 - rapidsai/cudf#14741
 - rapidsai/raft#2088

Authors:
  - Mark Harris (https://github.com/harrism)

Approvers:
  - Michael Schellenberger Costa (https://github.com/miscco)
  - Rong Ou (https://github.com/rongou)

URL: #1424
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] Update cuDF to always explicitly specify RMM pool size and avoid using rmm::detail APIs
3 participants