My Coding > Programming language > Python > Python libraries and packages > Python CuPy (CUDA+NumPy)

Python CuPy (CUDA+NumPy)

CuPy is an open-source array library for GPU-accelerated computing with Python with almost NumPy functionality. It can accelerate some Numpy manipulations up to 200 times. Bigger data structure will give more accelerations.

Installibn SciPy

For instalation CuPy library, it is nesessary to have Python v3.7.0+ and higher and CUDA Toolkit v10.2 / v11.0 / v11.1 / v11.2 / v11.3 / v11.4 / v11.5 / v11.6 / v11.7


# Install further libraries for CuPy
python -m cupyx.tools.install_library --cuda 11.6 --library cutensor
# For CUDA 10.2
pip install cupy-cuda102

# For CUDA 11.0
pip install cupy-cuda110

# For CUDA 11.1
pip install cupy-cuda111

# For CUDA 11.2
pip install cupy-cuda112

# For CUDA 11.3
pip install cupy-cuda113

# For CUDA 11.4
pip install cupy-cuda114

# For CUDA 11.5
pip install cupy-cuda115

# For CUDA 11.6
pip install cupy-cuda116

# For CUDA 11.7
pip install cupy-cuda117

# For Anaconda install:
conda install -c conda-forge cupy

# For Anaconda install selected version
conda install -c conda-forge cupy cudatoolkit=11.0

Upgrade CuPy

You can easily upgrade CuPy with command


pip install -U cupy

or if you need to reinstall Cupy, use following commands:


pip uninstall cupy
pip install cupy --no-cache-dir

Uninstalling CuPy

To remove CuPy from computer use following command:


pip uninstall cupy


Published: 2022-07-16 14:04:20

Last 10 artitles


9 popular artitles

© 2020 MyCoding.uk -My blog about coding and further learning. This blog was writen with pure Perl and front-end output was performed with TemplateToolkit.