主页

索引

模块索引

搜索页面

cuda

2.预安装

2.1. Verify You Have a CUDA-Capable GPU:

$ lspci | grep -i nvidia

2.2. Verify You Have a Supported Version of Linux:

$ uname -m && cat /etc/*release

2.3. Verify the System Has gcc Installed:

$ gcc --version

2.4. Verify the System has the Correct Kernel Headers and Development Packages Installed:

$ uname -r

The kernel headers and development packages for the currently running kernel can be installed:

RHEL/CentOS
$ sudo yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
Ubuntu
$ sudo apt-get install linux-headers-$(uname -r)

2.5. Choose an Installation Method:

1. distribution-specific packages (RPM and Deb packages)
2. distribution-independent package (runfile packages)
可能的话建议使用第1种方法

2.6. Download the NVIDIA CUDA Toolkit:

http://developer.nvidia.com/cuda-downloads

3. Package Manager Installation

$> sudo yum install
$> sudo yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
$> sudo yum clean all
$> sudo yum -y install nvidia-driver-latest-dkms cuda

CUDA 工具包:

sudo apt install nvidia-cuda-toolkit

export PATH=/usr/local/cuda/bin:$PATH

// 检查 nvcc 是否可用
nvcc --version

主页

索引

模块索引

搜索页面