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

Add managed option for RMM Pool memory resource to C API #305

Merged
merged 55 commits into from
Sep 27, 2024

Conversation

ajit283
Copy link
Contributor

@ajit283 ajit283 commented Aug 27, 2024

No description provided.

@ajit283 ajit283 requested review from a team as code owners August 28, 2024 13:13
@ajit283 ajit283 requested a review from raydouglass August 28, 2024 13:13
@ajit283
Copy link
Contributor Author

ajit283 commented Aug 28, 2024

Hi @cjnolet I think this implementation using make_owning_wrapper is more extensible and doesn't throw an error when the current memory resource is not a cuda_memory_resource

Copy link
Member

@benfred benfred left a comment

Choose a reason for hiding this comment

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

thanks for adding this!

This mostly looks good to me, left some more comments below:

cpp/include/cuvs/core/c_api.h Outdated Show resolved Hide resolved
cpp/src/core/c_api.cpp Outdated Show resolved Hide resolved
cpp/src/core/c_api.cpp Show resolved Hide resolved
cpp/test/core/c_api.c Outdated Show resolved Hide resolved
cpp/test/core/c_api.c Outdated Show resolved Hide resolved
@benfred
Copy link
Member

benfred commented Sep 6, 2024

/ok to test

@benfred
Copy link
Member

benfred commented Sep 9, 2024

/ok to test

@cjnolet
Copy link
Member

cjnolet commented Sep 20, 2024

/ok to test

@bdice bdice removed request for a team and raydouglass September 20, 2024 17:33
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

I left two nonblocking comments. This PR did not require a packaging/CI review (which was requested). This PR had some complicated merge history and so it may have needed a review from some changes that were ultimately not in the final changeset. In the future you can try to deselect the packaging/CI review groups. If they are required, you won't be able to deselect them. If you can deselect them, the review wasn't really needed.

@@ -17,6 +17,7 @@
#pragma once

#include <cuda_runtime.h>
#include <stdbool.h>
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 not a C wizard -- but is this include really needed? It sounds like it's a compatibility shim for super old-school C code. https://stackoverflow.com/questions/47374356/why-use-stdbool-h-instead-of-bool

I'd be happy to learn more -- but this might have just been an include automatically added by an IDE?

std::make_shared<rmm::mr::managed_memory_resource>());
} else {
mr = std::static_pointer_cast<rmm::mr::device_memory_resource>(
std::make_shared<rmm::mr::cuda_memory_resource>());
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use an async memory resource by default?

@cjnolet
Copy link
Member

cjnolet commented Sep 27, 2024

/ok to test

@cjnolet
Copy link
Member

cjnolet commented Sep 27, 2024

/ok to test

@cjnolet
Copy link
Member

cjnolet commented Sep 27, 2024

/merge

@rapids-bot rapids-bot bot merged commit 28ee7d2 into rapidsai:branch-24.10 Sep 27, 2024
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

5 participants