1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AMD の GPU で Pytorch を動かす with ROCm + Docker

Last updated at Posted at 2023-04-01

Ubuntu 22.04LTS の場合です。

手順

基本、下記に書いてある通りです。

ただし、deb ファイルはカーネルに対応した適切なバージョンを選ぶ必要があるようです。たとえば 5.15 (22.04LTS デフォルト) なら、

$ wget https://repo.radeon.com/amdgpu-install/5.3/ubuntu/jammy/amdgpu-install_5.3.50300-1_all.deb

とします(ドライバのバージョンは 5.3 にする)。これをしないと次の dkms でつまづきます。

Docker の最新版を入れたいときは下記

amdgpu-dkms のビルドに失敗しておかしくなったときは下記

どうしてもうまくいかないときは、インストール時に dkms をインストールしない。

$ amdgpu-install  --no-dkms

入れてから動かくなった場合は、remove する。

$ sudo apt remove amdgpu-dkms

ROCm-Python コンテナの起動は下記

以上で mnist は動きました。ddp も NVIDA 用のコードそのままでいけました。

1
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?