Skip to content

hdnhan/cpp-cuda-deeplearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To compile programs in folder cuda/ which combine of these repos: Nvidia Website, Nvidia Github Examples and, CoffeeBeforeArch Github.

Another interesting topic: int32_t vs float32 both have the same size in memory, but their behavior is quite different, read stackoverflow, wiki and, wiki, which heavily affect accuracy.

Install CUDA

Install Nvidia driver

sudo apt update
sudo apt install cmake git
sudo ubuntu-drivers install
# if not found, sudo apt-get install ubuntu-drivers-common
# check if the drivers are installed
nvidia-smi

Install CUDA Toolkit

This https://developer.nvidia.com/cuda-toolkit-archive for scripts to install CUDA Toolkit.

Note :

Runfile (local)

  • Download file
    wget https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
  • Check gcc vs g++ version
    sudo apt install gcc-10 g++-10
    gcc-10 --version
    g++-10 --version
  • If multiple versions, use alias for gcc and g++
    sudo ln -sf /usr/bin/gcc-10 /usr/bin/gcc
    sudo ln -sf /usr/bin/g++-10 /usr/bin/g++
    gcc --version
    g++ --version
  • Check whether nvidia driver is installed (type nvidia-smi). If yes, uncheck driver in the list
    sudo sh cuda_11.3.1_465.19.01_linux.run

Deb (local)

Deb (network)

Common

Check version

ls /usr/local | grep cuda # => different cuda versions
/usr/local/cuda-11.3/bin/nvcc --version

Use alias

If multiple versions, to use cuda instead cuda-11.3. Reference https://stackoverflow.com/questions/45477133/how-to-change-cuda-version

sudo ln -sf /usr/local/cuda-11.3 /usr/local/cuda
/usr/local/cuda/bin/nvcc --version

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published