ai:pytorch
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
ai:pytorch [2019/12/29 17:05] – [メモ] oga | ai:pytorch [2021/11/27 20:42] – [ROCm 4.3 + PyTorch 1.11] oga | ||
---|---|---|---|
行 36: | 行 36: | ||
<code cpp> | <code cpp> | ||
+ | # | ||
+ | |||
class ModelFCImpl : public torch:: | class ModelFCImpl : public torch:: | ||
torch:: | torch:: | ||
行 59: | 行 61: | ||
</ | </ | ||
+ | Shape 定義は NCHW 形式で IntArrayRef を使う。< | ||
+ | TORCH_MODULE() で定義しておけば直接 torch:: | ||
+ | ===== C++ API sample ===== | ||
+ | https:// | ||
+ | |||
+ | ====== RADEON (ROCm) で PyTorch を使う方法 ====== | ||
+ | |||
+ | RADEON で PyTorch の < | ||
+ | |||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | ==== ROCm 4.3 + PyTorch 1.11 ==== | ||
+ | |||
+ | * Ubuntu 20.04LTS RADEON Vega 56 | ||
+ | |||
+ | < | ||
+ | $ sudo apt update | ||
+ | $ sudo apt dist-upgrade | ||
+ | $ sudo apt install libnuma-dev | ||
+ | $ sudo reboot | ||
+ | $ sudo apt install wget gnupg2 | ||
+ | $ wget -q -O - https:// | ||
+ | $ echo 'deb [arch=amd64] https:// | ||
+ | $ sudo apt update | ||
+ | $ sudo rocminfo | ||
+ | $ sudo apt install rocm-dkms | ||
+ | $ sudo reboot | ||
+ | $ sudo apt install git cmake | ||
+ | $ sudo apt install python3-pip | ||
+ | $ pip3 install setuptools numpy wheel pyyaml | ||
+ | $ git clone --recursive https:// | ||
+ | $ cd pytorch | ||
+ | $ sudo apt install rccl rocm-libs | ||
+ | $ pip3 install typing_extensions | ||
+ | $ python3 tools/ | ||
+ | $ ROCclr_DIR=/ | ||
+ | </ | ||
ai/pytorch.txt · 最終更新: 2021/11/27 20:45 by oga