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 to_dlpack/from_dlpack APIs to pylibcudf #17055

Merged
merged 11 commits into from
Oct 25, 2024

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Oct 10, 2024

Description

Contributes to #15162

Could use some advice how to type the input of from_dlpack and outut of to_dlpack which are PyCapsule objects.
EDIT: I notice Cython just types them as object https://github.com/cython/cython/blob/master/Cython/Includes/cpython/pycapsule.pxd. Stylistically do we want add object var_name or just leave untyped?

Checklist

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

@mroeschke mroeschke added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package labels Oct 10, 2024
@mroeschke mroeschke requested a review from a team as a code owner October 10, 2024 22:28
@github-actions github-actions bot added the Python Affects Python cuDF API. label Oct 10, 2024
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.

It looks like PyCapsules are used to handle raw C pointers in Python? So it makes sense to me to type from_dlpack and to_dlpack withobject. I'd like to see what @vyasr thinks because I'm not sure.

python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/tests/test_interop.py Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pxd Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pxd Outdated Show resolved Hide resolved
python/cudf/cudf/_lib/interop.pyx Outdated Show resolved Hide resolved
@Matt711 Matt711 requested a review from a team as a code owner October 22, 2024 21:36
dependencies.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

Some suggestions for improvement, but overall this looks great and I don't need to review again.

python/pylibcudf/pylibcudf/interop.pyx Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
python/pylibcudf/pylibcudf/interop.pyx Outdated Show resolved Hide resolved
@Matt711
Copy link
Contributor

Matt711 commented Oct 25, 2024

/merge

@rapids-bot rapids-bot bot merged commit 8bc9f19 into rapidsai:branch-24.12 Oct 25, 2024
125 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants