Skip to content

[FEA]: Expose get_cuda_native_handle to Python #564

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

Open
1 task done
leofang opened this issue Apr 22, 2025 · 0 comments
Open
1 task done

[FEA]: Expose get_cuda_native_handle to Python #564

leofang opened this issue Apr 22, 2025 · 0 comments
Labels
cuda.bindings Everything related to the cuda.bindings module feature New feature or request P1 Medium priority - Should do

Comments

@leofang
Copy link
Member

leofang commented Apr 22, 2025

Is this a duplicate?

Area

cuda.bindings

Is your feature request related to a problem? Please describe.

In #463 we added experimental C++ APIs get_cuda_native_handle for C/C++/Cython to access the C handles wrapped by cuda.bindings types/objects. This issue is to track the need of exposing such APIs to Python to replace the current usage of __int__(), something along this line:

from cuda.bindings.utils import get_cuda_native_handle
...

err, s = driver.cuStreamCreate()
s_ptr = get_cuda_native_handle(s)
assert isinstance(s_ptr, int)

We may also consider moving the C++ counterparts from cuda.core to cuda.bindings.

Describe the solution you'd like

n/a

Describe alternatives you've considered

n/a

Additional context

n/a

@leofang leofang added cuda.bindings Everything related to the cuda.bindings module feature New feature or request P1 Medium priority - Should do labels Apr 22, 2025
@leofang leofang added this to the cuda-python parking lot milestone Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda.bindings Everything related to the cuda.bindings module feature New feature or request P1 Medium priority - Should do
Projects
None yet
Development

No branches or pull requests

1 participant