I was addicted to the introduction, so I wrote an article.
CuPy? NumPy compatible GPU computing library.
Fast calculations in Python. NumPy compatible GPU computing library cupy https://purakaku-python.readthedocs.io/ja/master/chapter_ml/cupy.html
Extract only the range that seems necessary for the article
Type | spec/version |
---|---|
CPU | Intel Core i7-9700K |
RAM | DDR4-2133 32GB (8GBx4) |
GPU | NVIDIA GeForce GTX1080Ti |
OS | Windows10 Pro 1909 64Bit |
CUDA Toolkit10.2 | 10.2.89 |
Python3 | 3.7.6 |
CuPy v7 | 7.3.0 |
CuPy is not guaranteed to work on ** Windows. ** ** In addition, although this page explains how to use it on Windows, we do not recommend using it in an unsupported environment.
Execute the following command at the command prompt etc.
nvcc -V
After execution, if you receive the following response, you can confirm normally.
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89
Make a note of the release
number on the last line as it will be used when installing CuPy.
In this case, there is no problem if you write down only 10.2
.
'nvcc'Is an internal or external command,
It is not recognized as an operable program or batch file.
If you get such a response, you need to install the CUDA Toolkit.
** Download the one that suits your environment from the CUDA Toolkit Download Page **.
Either ʻexe [network]or ʻexe [local]
can be used.
Follow the displayed instructions to install as is.
I will use the numbers I wrote down here. In this case, it was 10.2
, so remove the comma and install it as follows.
pip install cupy-cuda102
Reboot the system after the installation completes successfully. The following article will be helpful for how to use it.
Introducing Cupy that can easily calculate GPU with python https://qiita.com/samacoba/items/d18e6cf09f544477aff4
import cupy as cp
Traceback (most recent call last):
File "C:\Users\thzking\AppData\Local\Continuum\anaconda3\lib\sit...
...
(Full error)
...
ImportError: DLL load failed:The specified module cannot be found.
-** Reboot if system has not been rebooted after setup (important) ** --Reconfirm CUDA version --Reinstall CuPy --Reinstalling CUDA Toolkit --Throw and sleep
Recommended Posts