File tree Expand file tree Collapse file tree
cuda_core/cuda/core/experimental Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,15 +102,17 @@ cdef class Event:
102102 self ._busy_waited = True
103103 if options.support_ipc:
104104 raise NotImplementedError (" WIP: https://github.com/NVIDIA/cuda-python/issues/103" )
105- _, self ._handle = driver.cuEventCreate(flags)
105+ err, self ._handle = driver.cuEventCreate(flags)
106+ raise_if_driver_error(err)
106107 self ._device_id = device_id
107108 self ._ctx_handle = ctx_handle
108109 return self
109110
110111 cpdef close(self ):
111112 """ Destroy the event."""
112113 if self ._handle is not None :
113- _ = driver.cuEventDestroy(self ._handle)
114+ err, = driver.cuEventDestroy(self ._handle)
115+ raise_if_driver_error(err)
114116 self ._handle = None
115117
116118 def __del__ (self ):
@@ -180,7 +182,7 @@ cdef class Event:
180182 @property
181183 def is_done (self ) -> bool:
182184 """Return True if all captured works have been completed , otherwise False."""
183- ( result ,) = driver.cuEventQuery(self._handle )
185+ result , = driver.cuEventQuery(self._handle )
184186 if result == driver.CUresult.CUDA_SUCCESS:
185187 return True
186188 if result == driver.CUresult.CUDA_ERROR_NOT_READY:
You can’t perform that action at this time.
0 commit comments