-
Notifications
You must be signed in to change notification settings - Fork 191
Closed
Labels
P0High priority - Must do!High priority - Must do!breakingBreaking changes are introducedBreaking changes are introducedcuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduleenhancementAny code-related improvementsAny code-related improvements
Milestone
Description
Today we always return a Python int
and erase the type information, e.g.
cuda-python/cuda_core/cuda/core/experimental/_stream.py
Lines 140 to 143 in 61ef224
@property | |
def handle(self) -> int: | |
"""Return the underlying cudaStream_t pointer address as Python int.""" | |
return int(self._mnff.handle) |
However, it could be possible that users want to retain the underlying
cuda.binding
type so that it can be consumed in, say, Cython:
from cuda.core.experimental import Device
from cuda.bindings.runtime cimport cudaStream_t
s = Device().create_stream()
cdef cudaStream_t s_cy = s.handle
We should keep .handle
's type, and add ..ptr
that returns the type-erased pointer address as Python int
Metadata
Metadata
Assignees
Labels
P0High priority - Must do!High priority - Must do!breakingBreaking changes are introducedBreaking changes are introducedcuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduleenhancementAny code-related improvementsAny code-related improvements