Custom kernels

cupy.ElementwiseKernel(in_params, …[, …])

User-defined elementwise kernel.

cupy.ReductionKernel(unicode in_params, …)

User-defined reduction kernel.

cupy.RawKernel(unicode code, unicode name, …)

User-defined custom kernel.

cupy.RawModule(unicode code=None, *, …[, …])

User-defined custom module.

cupy.fuse(*args, **kwargs)

Decorator that fuses a function.

JIT kernel definition

cupyx.jit.rawkernel([mode])

A decorator compiles a Python function into CUDA kernel.

cupyx.jit.threadIdx

dim3 threadIdx

cupyx.jit.blockDim

dim3 blockDim

cupyx.jit.blockIdx

dim3 blockIdx

cupyx.jit.gridDim

dim3 gridDim

cupyx.jit.syncthreads

Calls __syncthreads()

cupyx.jit.shared_memory

Allocates shared memory and returns the 1-dim array.

cupyx.jit._interface._JitRawKernel(func, mode)

JIT CUDA kernel object.

Kernel binary memoization

cupy.memoize(bool for_each_device=False)

Makes a function memoizing the result for each argument and device.

cupy.clear_memo()

Clears the memoized results for all functions decorated by memoize.