0
0

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.

Anaconda 3(Windows)でQuadro P1000を使う

Last updated at Posted at 2023-09-09

Anaconda と Windows

  • 本来ならデスクトップのUbuntuでゴリゴリやるのがいいのだけど
  • 気楽なノートPCとJupyter lab(notebook)で簡単なことはやっている

P1000 Laptopという貧弱なGPU、動いてもくれない

  • 今までほとんど働いてくれたことがない
  • 基本Intel内蔵の方が頑張る

Pytorch 公式より インストールコマンド入手

インフォメーション
やっぱりゲーミングPCとかワークステーションなんだろうなぁ
‐ 最近デスクトップセットアップするの面倒なんです。

ターミナル

conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia

  • 私はたまたまこれでした。

インフォメーション

Anaconda Navigator画面より、使っている環境のターミナルにインストールします。(Open Terminal)

屏幕截图 2023-09-04 21.38.56.png

4GBのVRAMでなにができる?

ターミナル
(osac) C:\Users\00an>conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.11.0
  latest version: 23.7.3

Please update conda by running

    $ conda update -n base -c defaults conda



# All requested packages already installed.


(osac) C:\Users\ooan>conda update -n base -c defaults conda
Collecting package metadata (current_repodata.json): done
Solving environment: |

インフォメーション
そろいもそろって古いバージョンだった模様…

ターミナル

# conda で拒否され,pipで
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu116
Collecting torch==1.13.1+cu116
  Downloading https://download.pytorch.org/whl/cu116/torch-1.13.1%2Bcu116-cp37-cp37m-win_amd64.whl (2434.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━ 1.7/2.4 GB 11.5 MB/s eta 0:01:03

CUDA対応版入れてハイ終わりでなかった・・・

  • False、つまり無効
ターミナル

Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
C:\Users\ntyan\anaconda3\envs\osac\lib\site-packages\torch\cuda\__init__.py:88: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 103: integrity checks failed (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\c10\cuda\CUDAFunctions.cpp:109.)
  return torch._C._cuda_getDeviceCount() > 0
False

NvidiaドライバとCUDA・Pytorchのバージョンが絶妙にバランスを取る

Windowsということもあり、せっせとWebからダウンロード

やっぱりですが、Anaconda Navigatorよりターミナルでsudo ~は怒られました

成功例

‐ Trueになった

ターミナル

(osac) C:\Users\ntyan>python
Python 3.7.16 (default, Jan 17 2023, 16:06:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.cuda.is_available())
True
>>>

一応ドライバとCUDAの違いを

  • (前) ドライバ510xxx、CUDA11.6
  • (後) ドライバ537xxx、CUDA12.2
    (nvidia-smi なのでCUDAはアヤシイ)

屏幕截图 2023-09-09 10.25.54.png

GPUとりあえず頑張ってるぞ!

  • 表示がおかしいのはご愛敬ですかね・・・
  • いいノートPCが欲しいなぁ。夏は切実にそう思います。
  • ドライバのバージョン
  • Pytorch(Tensorflowもかな?)のバージョン
  • CUDAのバージョン
  • それぞれ注意しましょう。
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?