@memoize(for_each_device=True)
def elementwise(in_params, out_params, operation, name, **kwargs):
 check_cuda_available()
 return cupy.ElementwiseKernel(in_params, out_params, operation, name, **kwargs)

@ memoize ( for_each_device = True ) def elementwise ( in_params , out_params , operation , name , ** kwargs ) : check_cuda_available ( ) return cupy . ElementwiseKernel ( in_params , out_params , operation , name , ** kwargs )
creates an elementwise kernel function .