LoginSignup
4
2

More than 5 years have passed since last update.

Ubuntu16.04でCUDA9.2からCUDA8.0に速攻ダウングレードしたい時のメモ

Posted at

CUDA9.2をアンインストール

$ sudo apt purge cuda*
$ sudo apt purge nvidia-cuda-*
$ sudo apt purge libcuda*
$ sudo reboot

CUDA8.0をダウングレード&インストール

$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
$ sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
$ sudo apt-get update
$ sudo apt-get install cuda-8-0

ここでキモになるのは.bashrcなどに書かれたパスが9.2のままになっているはずなのでこれを直す

export PATH=/usr/local/cuda-8.0/bin:${PATH}

上記のようなパスがどっかにあるはず?
これをダウングレードまたはアップグレードした任意のバージョンに置き換えればおそらく他のバージョン同士でのアップグレード&ダウングレードにいつでも対応できそう。

また例によってnvidia-smiコマンドを使っても新しいグラフィックドライバを使ってると


+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.79       Driver Version: 410.79       CUDA Version: 10.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:05:00.0  On |                  N/A |
|  0%   46C    P8    17W / 300W |    232MiB / 11175MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1011      G   /usr/lib/xorg/Xorg                           178MiB |
|    0      1626      G   compiz                                        51MiB |
+-----------------------------------------------------------------------------+

CUDA.ver10.0と表示される問題は変らない
(詳しくは以下の記事で)
https://qiita.com/_JG1WWK/items/bfb59e2589b82bf5a8b3

またこのやりかたでROCm/CUDA混成環境でダウングレードしても一応rocm側と競合等が新たに発生してないことを
上記の記事と同一の環境で確認できた。

参考

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2