nvidia-cuda-toolkit for Debian ------------------------------ Contents: 1. Getting NVCC Working with the Compiler 2. Installing the CUDA Code Samples Getting NVCC Working with the Compiler ====================================== It is worth noting that not all compilers can be used together with NVCC. Here is a list of possible combinations, partially based on [1]: ``` CUDA Toolkit Version | Supported GCC Versions | Supported Clang Versions ---------------------+------------------------+------------------------- 11.5 | 6 - 11 | 6.0 - 12 11.4.1 | 6 - 11 | 6.0 - 11 11.4 | 6 - 10 | 6.0 - 11 11.3 | (5) 6 - 10 | (3.8) 6.0 - 11 11.2 | (5) 6 - 10 | (3.8) 6.0 - 11 11.1 | (5) 6 - 10 | (3.8) 6.0 - 10 11.0 | (5) 6 - 9 | (3.8) 6.0 - 9 10.2 | 5 - 8 | 3.8 - 8 10.1 Update 1 | 5 - 8 | 3.8 - 8 10.1 | 5 - 8 | 3.8 - 7 10.0 | 5 - 7 | 3.8 - 6.0 9.2 | 5 - 7 | 3.8 - 5.0 9.1 | 5 - 6 | 3.8 - 4.0 9.0 | 5 - 6 | 3.8 - 3.9 8.0 | 5 | 3.8 7.5 | 4.9 (5) | 3.6 ``` [1] https://gist.github.com/ax3l/9489132 Installing the CUDA Code Samples ================================= The CUDA Code Samples come with non-redistributable media files (images, videos, ...) and therefore cannot be packaged. (See https://bugs.debian.org/702948 for details.) To install the CUDA Code Samples, download the RUN installer for Linux from https://developer.nvidia.com/cuda-downloads#linux This download includes an old driver and the full toolkit, but unfortunately there is no separate download available for the Samples. Install the Samples to ~/NVIDIA_CUDA-11.2_Samples/ with sh cuda_11.2.2_460.32.03_linux.run --silent --samples --samplespath=$HOME (Adjust the filename if you downloaded a different version.) The following Debian packages are needed to build the examples: * freeglut3-dev * libfreeimage-dev * libglfw3-dev * libvulkan-dev * pkgconf This optional package will be used if it is installed, too: * mpi-default-dev For using clang as host compiler, this package is needed as well: * libomp-dev To build the example programs, change to the directory where the Samples were installed (by default: ~/NVIDIA_CUDA-11.2_Samples/) and run MA_LIBDIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) make CUDA_PATH=/usr CUDA_SEARCH_PATH=$MA_LIBDIR GLPATH=$MA_LIBDIR VULKAN_SDK_PATH=$MA_LIBDIR Optionally add HOST_COMPILER=... to select a different compiler for the host parts of the code. Currently up to g++-10 and clang++-11 are supported. For more information on the Samples, please see https://developer.nvidia.com/cuda-code-samples -- Andreas Beckmann Sun, 18 Jul 2021 01:02:40 +0200