$ nvidia-smi
Fri Aug 26 21:21:14 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.47 Driver Version: 496.76 CUDA Version: 11.5 |
|-------------------------------+----------------------+----------------------+
| 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 ... On | 00000000:01:00.0 Off | N/A |
| N/A 52C P8 6W / N/A | 111MiB / 8192MiB | N/A Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
WSL環境はGPUのハードウェアを認識している
::
Python 3.8.5 (default, Sep 4 2020, 07:30:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.version.cuda
'11.3'
>>> torch.cuda.is_available()
False
$ nvcc -V
...
Cuda compilation tools, release 10.1, V10.1.243
10.1のままだ
:
(ldm) $ sudo update-alternatives --config cuda
There is only one alternative in link group cuda (providing /usr/local/cuda): /usr/local/cuda-11.7
Nothing to configure.
conda install pytorch torchvision -c pytorch
えー、CUDAは11.7だけがインストールされてるってことになってるぞ??
11.3をインストールする必要がある?
PyTorchは11.7で動くはずだという意見
:
(ldm) nishio@DESKTOP-0ET2LJF:~/stable-diffusion$ lspci
27fa:00:00.0 3D controller: Microsoft Corporation Device 008e
9e5b:00:00.0 3D controller: Microsoft Corporation Device 008e
$ sudo apt-get remove nvidia-cuda-toolkit
...
The following packages will be REMOVED:
nvidia-cuda-toolkit
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
...
$ nvcc -V
Command 'nvcc' not found, but can be installed with:
sudo apt install nvidia-cuda-toolkit
$ sudo apt-get install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
cuda is already the newest version (11.7.1-1).