-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Just leaving a note since its nice to share interest. My use-case is performing KDE many times on large (10 million) sets of data points.
I thought I would have a play and see if it would be low-hanging fruit to add support for CuPy to KDEpy. CuPy is a GPU library with NumPy-like syntax. One of the really nice features is that (when supported), NumPy functions will automatically use the CuPy equivalent when applied to a CuPy array. GPUs are ridiculously fast at calculating FFTs compared to NumPy, so I thought it might be nice to take the speedup provided by KDEpy even further. From what I can tell from the docstring of FFTKDE, the FFT (and not the linear binning) is the bottleneck.
After playing around a bit, I realised that the cutils code is a hard dependency, but also that you've written a (slower) numpy function. I'm a bit surprised that there don't exist faster numpy (and hence CuPy) binning implementations - perhaps this would be an idea to look out for? Do I understand correctly that the binning algorithm you're using is bilinear binning?
(btw, I kept getting gcc: error: KDEpy/cutils.c: No such file or directory
(full error here) when trying to developer install it with pip on Ubuntu)
Just thought I'd bring the topic up, as I thought your library was cool! :)