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.

non-SciPy compat Signal API#

The functions under cupyx.signal are non-SciPy compat signal API ported from cuSignal through the courtesy of Nvidia cuSignal team.

cupyx.signal.channelize_poly(x, h, n_chans)

Polyphase channelize signal into n channels

cupyx.signal.convolve1d3o(in1, in2[, mode, ...])

Convolve a 1-dimensional array with a 3rd order filter.

cupyx.signal.pulse_compression(x, template)

Pulse Compression is used to increase the range resolution and SNR by performing matched filtering of the transmitted pulse (template) with the received signal (x)

cupyx.signal.pulse_doppler(x[, window, nfft])

Pulse doppler processing yields a range/doppler data matrix that represents moving target data that's separated from clutter.

cupyx.signal.cfar_alpha(pfa, N)

Computes the value of alpha corresponding to a given probability of false alarm and number of reference cells N.

cupyx.signal.ca_cfar(array, guard_cells, ...)

Computes the cell-averaged constant false alarm rate (CA CFAR) detector threshold and returns for a given array.

cupyx.signal.freq_shift(x, freq, fs)

Frequency shift signal by freq at fs sample rate

Profiling utilities#

cupyx.profiler.benchmark(func[, args, ...])

Timing utility for measuring time spent by both CPU and GPU.

cupyx.profiler.time_range([message, ...])

Mark function calls with ranges using NVTX/rocTX.

cupyx.profiler.profile()

Enable CUDA profiling during with statement.

DLPack utilities#

Below are helper functions for creating a cupy.ndarray from either a DLPack tensor or any object supporting the DLPack data exchange protocol. For further detail see DLPack.

cupy.from_dlpack(array)

Zero-copy conversion between array objects compliant with the DLPack data exchange protocol.

Automatic Kernel Parameters Optimizations (cupyx.optimizing)#

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

Context manager that optimizes kernel launch parameters.