Lably
Skip to content

CuPy

Numerical programming library for the Python programming language

  • 5 min read
  • 3 chapters

Related on Lably

Through Open-source software, Python (programming language) and NumPy

CuPy has been initially developed as a backend of Chainer deep learning framework, and later established as an independent project in 2017.

CuPy is a part of the NumPy ecosystem array libraries and is widely adopted to utilize GPU with Python, especially in high-performance computing environments such as Summit, Perlmutter, EULER, and ABCI.

CuPy is a NumFOCUS sponsored project.

Features

CuPy implements NumPy/SciPy-compatible APIs, as well as features to write user-defined GPU kernels or access low-level APIs.

NumPy-compatible APIs

The same set of APIs defined in the NumPy package (numpy.*) are available under cupy.* package.

SciPy-compatible APIs

The same set of APIs defined in the SciPy package (scipy.*) are available under cupyx.scipy.* package.

User-defined GPU kernels

  • Kernel templates for element-wise and reduction operations
  • Raw kernel (CUDA C/C++)
  • Just-in-time transpiler (JIT)
  • Kernel fusion

Distributed computing

  • Distributed communication package (cupyx.distributed), providing collective and peer-to-peer primitives

Low-level CUDA features

  • Stream and event
  • Memory pool
  • Profiler
  • Host API binding
  • CUDA Python support

Interoperability

  • DLPack
  • CUDA Array Interface
  • NEP 13 (__array_ufunc__)
  • NEP 18 (__array_function__)
  • Array API Standard

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication

Source and licence. Adapted from the Wikipedia article “CuPy” (this version, 2024-09-08) by its contributors, shared under CC BY-SA 4.0. Lablypedia has left out its tables, references and most pictures, and linked it to other Lablypedia articles.