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.
|
cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) nogil except ?cudaErrorCallRequiresNewerDriver: |
|
cdef cudaError_t err |
|
runtimeVersion[0] = m_global.CUDART_VERSION |
|
return cudaSuccess |
|
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