how to check cuda version

How to Check CUDA Version

Knowing the CUDA version installed on your system is important when working with CUDA-enabled applications. Here’s how you can easily check the CUDA version using the command line:

  1. Open a terminal or command prompt window.

  2. Type the following command to check the CUDA version:
    nvcc --version

  3. Press Enter to execute the command.

  4. The CUDA version information will be displayed in the output, typically appearing as something like:
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2019 NVIDIA Corporation
    Built on Sun_Jul_28_19:07:16_PDT_2019
    Cuda compilation tools, release 10.1, V10.1.243

  5. In this example, the CUDA version is shown as “release 10.1, V10.1.243”.

Alternatively, you can also check the CUDA version by running the following command:

cat /usr/local/cuda/version.txt

This will display the CUDA version information stored in the version.txt file, which should be located in the CUDA installation directory.

By following these steps, you can easily determine the CUDA version installed on your system, allowing you to ensure compatibility with CUDA-based software or libraries.