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 pylibcudf.gpumemoryview support for len()/nbytes #18133

Open
wants to merge 8 commits into
base: branch-25.04
Choose a base branch
from

Conversation

pentschev
Copy link
Member

Description

Add support for len() and nbytes in pylibcudf.gpumemoryview. Having those methods is helpful to ensure proper serialization in Dask/Distributed, as utility methods that serialize objects, in this case used by cudf-polars, may use the appropriate method or property to determine the size of the object being transferred.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@pentschev pentschev requested a review from a team as a code owner February 28, 2025 18:39
@pentschev pentschev requested review from vyasr and Matt711 February 28, 2025 18:39
@github-actions github-actions bot added Python Affects Python cuDF API. pylibcudf Issues specific to the pylibcudf package labels Feb 28, 2025
@pentschev pentschev added feature request New feature or request 2 - In Progress Currently a work in progress non-breaking Non-breaking change labels Feb 28, 2025
Copy link
Contributor

@Matt711 Matt711 left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@rjzamora rjzamora left a comment

Choose a reason for hiding this comment

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

I definitely prefer this over rapidsai/rapids-dask-dependency#89

@pentschev
Copy link
Member Author

Thanks @pentschev, can you update the type stub? https://github.com/rapidsai/cudf/blob/branch-25.04/python/pylibcudf/pylibcudf/gpumemoryview.pyi

Sure, thanks for the reminder @Matt711 ! Done in 41844b7 .

@pentschev
Copy link
Member Author

I definitely prefer this over rapidsai/rapids-dask-dependency#89

Agreed, closed that in favor of the change in this PR.

@pentschev pentschev added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team feature request New feature or request non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants