RTX3000番台(Ampere)でtensorflow-gpu 1.15を使う
- 2021/12/12
- Update: 2022/5/11
- Tensorflow
- #Python #Tensorflow
こんにちは.今回は RTX3090 や 3080 などの GPU で Tensorflow の 1.15 と Tensorboard を利用する方法をメモします.
公式が配布している Tensorflow で 3000 番台の GPU を利用するには 2 系に上げなければいけません.
Tensorflow は 1 系と 2 系で API の仕様が変更されているため,1 系のコードを動かすのは大変です.
そこで,公式が配布しているものではなく,NVIDIA が配布しているものを使います.
pip install nvidia-pyindex
pip install nvidia-tensorflow
pip uninstall tensorboard
pip install nvidia-tensorboard
要件として,
- Ubuntu 20.04 or later
- Nvidia Driver r455
- Python 3.8
- pip 19.0 or later
が求められます.
これで Tensorflow==1.15 & Tensorboard が RTX 3090 でも使えます!
参考
Accelerating TensorFlow on NVIDIA A100 GPUs | NVIDIA Technical Blog
The NVIDIA A100, based on the NVIDIA Ampere GPU architecture, offers a suite of exciting new features: third-generation Tensor Cores, Multi-Instance GPU (MIG) and third-generation NVLink.
![Accelerating TensorFlow on NVIDIA A100 GPUs | NVIDIA Technical Blog](https://developer-blogs.nvidia.com/wp-content/uploads/2020/07/tf_logo_social.png)
RTX3070などの30xx系GPU かつ CUDA11.3 インストール済みのホストPC上でTensorFlow v1.15.5を動かす
![RTX3070などの30xx系GPU かつ CUDA11.3 インストール済みのホストPC上でTensorFlow v1.15.5を動かす](https://res.cloudinary.com/zenn/image/upload/s--FYhmRe8E--/c_fit%2Cg_north_west%2Cl_text:notosansjp-medium.otf_55:RTX3070%25E3%2581%25AA%25E3%2581%25A9%25E3%2581%25AE30xx%25E7%25B3%25BBGPU%2520%25E3%2581%258B%25E3%2581%25A4%2520CUDA11.3%2520%25E3%2582%25A4%25E3%2583%25B3%25E3%2582%25B9%25E3%2583%2588%25E3%2583%25BC%25E3%2583%25AB%25E6%25B8%2588%25E3%2581%25BF%25E3%2581%25AE%25E3%2583%259B%25E3%2582%25B9%25E3%2583%2588PC%25E4%25B8%258A%25E3%2581%25A7TensorFlow...%2Cw_1010%2Cx_90%2Cy_100/g_south_west%2Cl_text:notosansjp-medium.otf_37:PINTO%2Cx_203%2Cy_121/g_south_west%2Ch_90%2Cl_fetch:aHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2czMW9DdWpQQmY4YmFpTXFmY0M4bG5jamUxVnZBWUdTeEVZMnN6VXc9czI1MC1j%2Cr_max%2Cw_90%2Cx_87%2Cy_95/v1627283836/default/og-base-w1200-v2.png)
GitHub - NVIDIA/tensorflow: An Open Source Machine Learning Framework for Everyone
An Open Source Machine Learning Framework for Everyone - GitHub - NVIDIA/tensorflow: An Open Source Machine Learning Framework for Everyone