Routines

The following pages describe NumPy-compatible routines. These functions cover a subset of NumPy routines.

CUB/cuTENSOR backend for reduction routines

Some CuPy reduction routines, including sum(), amin(), amax(), argmin(), argmax(), and other functions built on top of them, can be accelerated by switching to the CUB or cuTENSOR backend. These backends can be enabled by setting CUPY_ACCELERATORS environement variable as documented here. Note that while in general the accelerated reductions are faster, there could be exceptions depending on the data layout. We recommend users to perform some benchmarks to determine whether CUB/cuTENSOR offers better performance or not.