Rohit Beriwal

SciPy 2019 - Cupy (by Masayuki Takagi)

It is developed and maintained by Preffered Networks- an AI startup in Japan.

Drop-in replacement with Numpy

Example: (comments are the lines that can be replaced)


# import cupy as cp
import numpy as np

# x = cp.random.rand(10)
x = np.random.rand(10)

# W = cp.random.rand(10, 5)
W = np.random.rand(10, 5)

# y = cp.dot(x, W)
y = np.dot(x, W)

Supported libraries and function within cupy:

Getting started with CuPy:

Installation

# cuda10.2 ...or whatever the latest version is
pip install cupy-cuda102

# Non usual binary
pip install cupy

Advanced Features: