環(huán)境
ubuntu:16.04 sever
gpu:tesla p100-pcie
安裝cuda8.0對應驅動
進入nvidia driver官網(wǎng),不要按照備注安裝,因為我們需要配置安裝參數(shù)。
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/384.66/NVIDIA-Linux-x86_64-384.66.run
sudo ./NVIDIA-Linux-x86_64-384.66.run --ui=none --no-questions --accept-license --disable-nouveau --no-opengl-files
nvidia-smi
Sun Sep 30 16:23:15 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.66 Driver Version: 384.66 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla P100-PCIE... Off | 00000000:00:09.0 Off | 0 |
| N/A 35C P0 26W / 250W | 0MiB / 12193MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
安裝cuda8.0
進入官網(wǎng)下載
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda_8.0.61.2_linux-run ##補丁
sudo ./cuda_8.0.61_375.26_linux-run
sudo ./cuda_8.0.61.2_linux-run
過程中不安裝cuda帶的驅動,其他yes,同時指定sample例子路徑
測試例子
cd NVIDIA_CUDA-8.0_Samples/0_Simple/matrixMul
make
./matrixMul
[Matrix Multiply Using CUDA] - Starting...
GPU Device 0: "Tesla P100-PCIE-12GB" with compute capability 6.0
MatrixA(320,320), MatrixB(640,320)
Computing result using CUDA Kernel...
done
Performance= 358.04 GFlop/s, Time= 0.366 msec, Size= 131072000 Ops, WorkgroupSize= 1024 threads/block
Checking computed result for correctness: Result = PASS
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
執(zhí)行ok,代表驅動正確安裝