-
Notifications
You must be signed in to change notification settings - Fork 933
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
Enable unified memory by default in cudf_polars
#17375
Conversation
cudf_polars
to use Unified Memory by default
Co-authored-by: Matthew Murray <[email protected]>
@@ -32,6 +33,37 @@ | |||
__all__: list[str] = ["execute_with_cudf"] | |||
|
|||
|
|||
def enable_uvm(device: int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be missing some context, but can you simplify this function given that rmm_mode
depends only on managed_memory_is_supported
and its never equal to "cuda"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we don't need to support all the modes like we do in cudf.pandas. In this case we should do a managed pool by default and fall back to the async allocator if not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function needs a docstring. Also, the name is misleading, it doesn't "enable uvm", it produces a memory resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved everything into default_memory_resource
cudf_polars
to use Unified Memory by default@@ -32,6 +33,37 @@ | |||
__all__: list[str] = ["execute_with_cudf"] | |||
|
|||
|
|||
def enable_uvm(device: int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we don't need to support all the modes like we do in cudf.pandas. In this case we should do a managed pool by default and fall back to the async allocator if not.
Co-authored-by: Vyas Ramasubramani <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two suggestions but assuming they're uncontroversial I don't need to review again. Please ping me if you need another look though. Thanks Prem!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but please address remaining comments.
Co-authored-by: Lawrence Mitchell <[email protected]>
Co-authored-by: Vyas Ramasubramani <[email protected]>
/merge |
/merge |
cudf_polars
Description
This PR enables Unified memory as the default memory resource for
cudf_polars
Checklist