What is KeOps?
KeOps is a library that computes on a GPU generic reductions of 2d arrays whose entries may be computed through a mathematical formula. We provide an autodiff engine to generate effortlessly the formula of the derivative. For instance, KeOps can compute Kernel dot products and their derivatives.
A typical sample of (pseudo) code looks like
from keops import Genred # create the function computing the derivative of a Gaussian convolution my_conv = Genred(reduction='Sum', formula ='Grad(Exp(-SqNorm2(x-y) / IntCst(2)), x, b)', alias =['x=Vi(3)', 'y=Vj(3)', 'b=Vi(3)']) # ... apply it to the 2d array x, y, b with 3 columns and a (huge) number of lines result = my_conv(x,y,b)
KeOps provides good performances and linear (instead of quadratic) memory footprint. It handles multi GPU. More details are provided here: