CuPy-specific functions

CuPy-specific functions are placed under cupyx namespace.

cupyx.rsqrt

Returns the reciprocal square root.

cupyx.scatter_add(a, slices, value)

Adds given values to specified elements of an array.

cupyx.scatter_max(a, slices, value)

Stores a maximum value of elements specified by indices to an array.

cupyx.scatter_min(a, slices, value)

Stores a minimum value of elements specified by indices to an array.

cupyx.empty_pinned(shape[, dtype, order])

Returns a new, uninitialized NumPy array with the given shape and dtype.

cupyx.empty_like_pinned(a[, dtype, order, …])

Returns a new, uninitialized NumPy array with the same shape and dtype as those of the given array.

cupyx.zeros_pinned(shape[, dtype, order])

Returns a new, zero-initialized NumPy array with the given shape and dtype.

cupyx.zeros_like_pinned(a[, dtype, order, …])

Returns a new, zero-initialized NumPy array with the same shape and dtype as those of the given array.

DLPack utilities

This is a helper function for creating a cupy.ndarray from a DLPack tensor. For further detail see DLPack.

cupy.fromDlpack(dltensor)

Zero-copy conversion from a DLPack tensor to a ndarray.

Automatic Kernel Parameters Optimizations (cupyx.optimizing)

cupyx.optimizing.optimize(*[, key, path, …])

Context manager that optimizes kernel launch parameters.