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

Switch rmm::get_current_device_resource to use references via rmm::get_current_device_resource_ref #2372

Merged

Conversation

hyperbolic2346
Copy link
Collaborator

This changes the use of rmm::get_current_device_resource to rmm::get_current_device_resource_ref to match up with the RMM incoming deprecation. I don't know when the original methods will be deprecated, but the new methods are available now, so it seemed a good idea to switch over.

closes #2358

@hyperbolic2346 hyperbolic2346 changed the title Switching get resource to use references Switch rmm::get_current_device_resource to use references via rmm::get_current_device_resource_ref Sep 3, 2024
Signed-off-by: Mike Wilson <[email protected]>
@hyperbolic2346
Copy link
Collaborator Author

build

Copy link
Collaborator

@abellina abellina left a comment

Choose a reason for hiding this comment

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

Thanks @hyperbolic2346 !

@hyperbolic2346 hyperbolic2346 merged commit ad271f0 into NVIDIA:branch-24.10 Sep 3, 2024
3 checks passed
@hyperbolic2346 hyperbolic2346 deleted the mwilson/resource-ref branch September 3, 2024 20:08
@harrism
Copy link

harrism commented Sep 3, 2024

@hyperbolic2346 @abellina you guys are getting a step ahead of me. Probably would have been nice to wait on rapidsai/cudf#16679 so you can use the cudf wrappers. That way if we need to change anything we can do it in one place in cudf.

@hyperbolic2346
Copy link
Collaborator Author

@harrism sorry about that. I will include that wrapper once it is merged.

@abellina
Copy link
Collaborator

abellina commented Sep 4, 2024

Sorry @hyperbolic2346 and @harrism I didn't realize rapidsai/cudf#16679 was in the works.

@harrism
Copy link

harrism commented Sep 5, 2024

BTW, I believe that this PR introduces a bug until rapidsai/rmm/#1661 is merged. That PR makes get_current_device_resource_ref() get the ref of the MR set with set_current_device_resource(). Before that change, resource_refs and resource pointers were kept separate because the ref APIs were not intended to be used across RAPIDS yet.

wjxiz1992 added a commit to wjxiz1992/spark-rapids-jni that referenced this pull request Sep 5, 2024
…ia `rmm::get_current_device_resource_ref` (NVIDIA#2372)"

This reverts commit ad271f0.
@abellina
Copy link
Collaborator

abellina commented Sep 5, 2024

Thanks @harrism we'll revert this for now until the RMM pr is merged.

@harrism
Copy link

harrism commented Sep 9, 2024

OK, rapidsai/rmm#1661 is now merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Move to RMM apis get_current_device_resource_ref
4 participants