CUDA runtime version vs CUDA driver version - what's the difference?

喜欢而已 提交于 2019-12-21 06:58:29

问题


The CUDA Runtime API exposes the functions

  • cudaRuntimeGetVersion() and
  • cudaDriverGetVersion()

(see detailed description here). I was sort of expecting the first one to give me "8.0" (for CUDA 8.0) and the second one to give me the same string as what I'd get from examining nVIDIA's GPU driver kernel module, e.g.

modinfo nvidia | grep "^version:" | sed 's/^version: *//;'

which on my system is 367.57.

Now, the first call gives me 8000 - fine, just a weird way to say 8.0 I guess; but the second API call also gives me 8000. So what do both of these mean?

The Runtime API documentation I linked to doesn't seem to explain this.


回答1:


The CUDA runtime version indicates CUDA compatibility (i.e. version) with respect to the installed cudart (CUDA runtime) library.

The CUDA driver version (as reported here) reports the same information with respect to the driver.

This relates to the driver compatibility model in CUDA. As I am sure you know, a particular CUDA toolkit version (i.e. CUDA runtime library version, nvcc compiler version, etc.) requires a particular minimum driver level for proper use of the codes compiled with that toolkit.

The CUDA driver version (as reported here) effectively reports what CUDA version(s) can be supported by the particular installed driver.

As you've already discovered, it does not report the actual numbered driver version.



来源:https://stackoverflow.com/questions/40589814/cuda-runtime-version-vs-cuda-driver-version-whats-the-difference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!