Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPU Programming

CUDA Setup

Driver

Find and download the correct driver from the nVidia website.

# Choose the MIT/GPL version from the installer options
sudo sh NVIDIA-Linux-x86_64-595.91.07.run
# driver info
nvidia-smi
cat /proc/driver/nvidia/version
modinfo nvidia | grep ^version
# uninstall the driver
sudo apt-get --purge remove "*nvidia*" "libxnvctrl*"
sudo apt-get purge nvidia*
sudo apt-get autoremove

CUDA Toolkit

# I prefer the local .run file on Debian.
# Since my GPU (5070 Ti) latest driver is 595.* I need CUDA 13.2.* from the archive.
# The "_595.71.05_" in the filename is the driver that is included
# with the download and optional during installation.
wget https://developer.download.nvidia.com/compute/cuda/13.2.2/local_installers/cuda_13.2.2_595.71.05_linux.run
sudo sh cuda_13.2.2_595.71.05_linux.run

Note

Please make sure that

  • PATH includes /usr/local/cuda-13.2/bin
  • LD_LIBRARY_PATH includes /usr/local/cuda-13.2/lib64, or, add /usr/local/cuda-13.2/lib64 to /etc/ld.so.conf and run ldconfig as root
export PATH=/usr/local/cuda-13.2/bin:$PATH
# paste path update to end of file
vim ~/.zshrc

Tip

To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-13.2/bin

# manual uninstall cuda
sudo apt-get --purge remove "*cuda*" "*cublas*" "*cufft*" "*cufile*" "*curand*" \
 "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*"

Compile

# manually compile
nvcc -o bin/primes primes.cu
# run
./bin/primes

About

Experiments with CUDA, C++ GPU programming.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages