2020年2月28日 星期五

pytorch gpu (Cuda 9.2) python 3.8.1

cuda_9.2.148_win10.exe
cuda_9.2.148.1_windows.exe
cudnn-9.2-windows10-x64-v7.6.5.32.zip

(base) C:\Users\me> conda create --name pytorch-gpu
(base) C:\Users\me> conda create --name pytorch-gpu python=3.7

(pytorch-gpu) C:\Users\me>pip install numpy
Collecting numpy
  Downloading numpy-1.18.1-cp38-cp38-win_amd64.whl (12.8 MB)
     |████████████████████████████████| 12.8 MB 1.6 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.18.1

(pytorch-gpu) C:\Users\me>pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html
Looking in links: https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html
Collecting torch
  Downloading https://download.pytorch.org/whl/nightly/cu92/torch-1.5.0.dev20200227%2Bcu92-cp38-cp38-win_amd64.whl (690.3 MB)
     |████████████████████████████████| 690.3 MB 15 kB/s
Collecting torchvision
  Downloading https://download.pytorch.org/whl/nightly/cu92/torchvision-0.6.0.dev20200228%2Bcu92-cp38-cp38-win_amd64.whl (1.4 MB)
     |████████████████████████████████| 1.4 MB 284 kB/s
Collecting pillow>=4.1.1
  Downloading Pillow-7.0.0-cp38-cp38-win_amd64.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 930 kB/s
Requirement already satisfied: numpy in c:\users\me\anaconda3\envs\pytorch-gpu\lib\site-packages (from torchvision) (1.18.1)
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: torch, pillow, six, torchvision
Successfully installed pillow-7.0.0 six-1.14.0 torch-1.5.0.dev20200227+cu92 torchvision-0.6.0.dev20200228+cu92

(pytorch-gpu) C:\Users\me>python
Python 3.8.1 (default, Feb 27 2020, 14:41:12) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>>

(pytorch-gpu) C:\Users\me>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:08:12_Central_Daylight_Time_2018
Cuda compilation tools, release 9.2, V9.2.148

沒有留言:

張貼留言