-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Description
The current implementation of cuda.cudart.cudaRuntimeGetVersion()
hard-codes the runtime version, rather than querying the runtime for its version. This results in incorrect runtime versions if the runtime version is different from the version of cuda-python.
cuda-python/cuda/_lib/ccudart/ccudart.pyx
Lines 79 to 82 in 746b773
cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) nogil except ?cudaErrorCallRequiresNewerDriver: | |
cdef cudaError_t err | |
runtimeVersion[0] = m_global.CUDART_VERSION | |
return cudaSuccess |
cuda-python/cuda/_lib/ccudart/utils.pyx
Line 37 in 746b773
self.CUDART_VERSION = 11060 |
Additional context
A workaround used in rapidsai/rmm#946 is to use numba's API for this instead:
import numba.cuda
def cudaRuntimeGetVersion():
major, minor = numba.cuda.runtime.get_version()
return major * 1000 + minor * 10
leofang, jakirkham and kmaehashi
Metadata
Metadata
Assignees
Labels
No labels