May 2019
Intermediate to advanced
452 pages
12h 16m
English
CuPy is an open source interface that is highly compatible with NumPy, which is the fundamental package for scientific computing with Python. As it follows the same NumPy model, just for CUDA GPUs, it can be used as a drop-in replacement for NumPy in most cases. All you need to do is just simply replace numpy with cupy in your Python code. We will look into a comparative example later in this chapter.
CuPy also uses NVIDIA's CUDA-related libraries, such as cuBLAS, cuDNN, cuSolver, cuSPARSE, cuFFT, cuRand, and NCCL, to harness the CUDA GPU architecture.
Like NumPy's numpy.ndarray, CuPy also consists of a similar implementation through cupy.ndarray. We will learn setting up CuPy in the next section.
Read now
Unlock full access