Is there any quick command or script to check for the version of CUDA installed?
I found the manual of 4.0 under the installation directory but I\'m not sure whether
If you have installed CUDA SDK, you can run "deviceQuery" to see the version of CUDA
One can get the cuda
version by typing the following in the terminal:
$ nvcc -V
# below is the result
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
Alternatively, one can manually check for the version by first finding out the installation directory using:
$ whereis -b cuda
cuda: /usr/local/cuda
And then cd
into that directory and check for the CUDA version.
if nvcc --version is not working for you then use cat /usr/local/cuda/version.txt
If you are running on linux:
dpkg -l | grep cuda
Programmatically with the CUDA Runtime API C++ wrappers:
auto v1 = cuda::version::maximum_supported_by_driver();
auto v2 = cuda::version::runtime();
This gives you a cuda::version_t
structure, which you can compare and also stream, e.g.:
if (v2 < cuda::version_t{ 8, 0 } ) {
std::cerr << "CUDA version " << v2 << " is insufficient." std::endl;
}
If you run
nvidia-smi
You should find the CUDA Version on the top right corner of the comand's output. At least I found that output for CUDA version 10.0 e.g.,