CUDA源地址

添加源

本人使用的是Open SUSE Leap 15.3则选用了:
https://mirrors.aliyun.com/nvidia-cuda/opensuse15/x86_64

# zypper -ar https://mirrors.aliyun.com/nvidia-cuda/opensuse15/x86_64 CUDA-Ali
# zypper ref
# zypper update

安装N卡驱动

# zypper in x11-video-nvidiaG05

安装重启后则可以使用nvidia-smi查看N卡信息。

$ nvidia-smi
Sun Aug  8 01:30:44 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02    Driver Version: 470.57.02    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P8    N/A /  N/A |      6MiB /  4040MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    None                                                                     |
+-----------------------------------------------------------------------------+

如果在图形界面需要使用N卡,则还需要安装x11的N卡驱动,否则nvidia-settings无法使用

# zypper in xf86-video-nv

根据根据需要安装cuda

# zypper zypper in cuda-11-4

安装完成后则可以使用nvcc编译器了。

Q.E.D.


ねだるな、勝ち取れ、さすれば与えれねん