Skip to content

Commit e95c4b1

Browse files
committed
nit: avoid cdef void
1 parent 7d68db2 commit e95c4b1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

cuda_core/cuda/core/experimental/_stream.pyx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,18 @@ cdef class Stream:
316316
self._get_device_and_context()
317317
return Device(self._device_id)
318318

319-
cdef void _get_context(Stream self) except *:
319+
cdef int _get_context(Stream self) except?-1:
320320
if self._ctx_handle is None:
321321
err, self._ctx_handle = driver.cuStreamGetCtx(self._handle)
322322
raise_if_driver_error(err)
323+
return 0
323324

324-
cdef void _get_device_and_context(Stream self) except *:
325+
cdef int _get_device_and_context(Stream self) except?-1:
325326
if self._device_id is None:
326327
# Get the stream context first
327328
self._get_context()
328329
self._device_id = get_device_from_ctx(self._ctx_handle)
330+
return 0
329331

330332
@property
331333
def context(self) -> Context:

cuda_core/cuda/core/experimental/_utils/__init__.pxd

Whitespace-only changes.

0 commit comments

Comments
 (0)