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
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;
}