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:
importnumba.cudadefcudaRuntimeGetVersion():
major, minor=numba.cuda.runtime.get_version()
returnmajor*1000+minor*10
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
cuda-python/cuda/_lib/ccudart/utils.pyx
Line 37 in 746b773
Additional context
A workaround used in rapidsai/rmm#946 is to use numba's API for this instead: