We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7eb1f commit 9e9b4c8Copy full SHA for 9e9b4c8
cuda_core/cuda/core/_device.pyx
@@ -58,8 +58,12 @@ cdef class DeviceProperties:
58
cdef inline _get_attribute(self, cydriver.CUdevice_attribute attr):
59
"""Retrieve the attribute value directly from the driver."""
60
cdef int val
61
+ cdef cydriver.CUresult err
62
with nogil:
- HANDLE_RETURN(cydriver.cuDeviceGetAttribute(&val, attr, self._handle))
63
+ err = cydriver.cuDeviceGetAttribute(&val, attr, self._handle)
64
+ if err == cydriver.CUresult.CUDA_ERROR_INVALID_VALUE:
65
+ return 0
66
+ HANDLE_RETURN(err)
67
return val
68
69
cdef _get_cached_attribute(self, attr):
0 commit comments