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

[WIP] Support converting cuda array interface objects with masks to pylibcudf Columns #18320

Draft
wants to merge 6 commits into
base: branch-25.04
Choose a base branch
from

Conversation

Matt711
Copy link
Contributor

@Matt711 Matt711 commented Mar 19, 2025

Description

Contributes to #15132 and #18214. I think this PR and #18311 should be sufficient for Curator to replace their existing logic to convert cupy arrays to list columns with from_pylibcudf and from_ndarray. Eg.

import cudf
import pylibcudf as plc

cudf.Series.from_pylibcudf(
    plc.Column.from_ndarray(...) # call on cupy array
)

Checklist

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

@Matt711 Matt711 added feature request New feature or request non-breaking Non-breaking change labels Mar 19, 2025
Copy link

copy-pr-bot bot commented Mar 19, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added Python Affects Python cuDF API. pylibcudf Issues specific to the pylibcudf package labels Mar 19, 2025
@Matt711
Copy link
Contributor Author

Matt711 commented Mar 19, 2025

/ok to test

@Matt711 Matt711 changed the title [WIP] Support converting cupy arrays with masks to pylibcudf Columns [WIP] Support converting cauda array interface objects with masks to pylibcudf Columns Mar 19, 2025
@Matt711 Matt711 changed the title [WIP] Support converting cauda array interface objects with masks to pylibcudf Columns [WIP] Support converting cuda array interface objects with masks to pylibcudf Columns Mar 19, 2025
return cp.asarray(np_2darray)


class CuPyArrayWithMask(cp.ndarray):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
class CuPyArrayWithMask(cp.ndarray):
# There no built-in way to create a cupy array with a
# mask. See https://github.com/cupy/cupy/issues/2225
class CuPyArrayWithMask(cp.ndarray):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant