Open gully opened 5 years ago
In principle GPUs do natively support linear interpolation (that's pretty much exactly what GPUs were designed to do!) and perhaps we could work out the reverse mode op for this using the same features, but this would probably take some serious CUDA know how that I don't have. It would definitely be a welcome addition, but don't hold your breath for an implementation coming from us :-)
Tensorflow offers wide support for hardware acceleration with Graphics Processing Units (GPUs). In principle, wobble could leverage this native GPU support to make it even faster.
I explored the prospect of wobble with GPUs on Google colaboratory, with no effort to modify the existing wobble code to anticipate GPUs:
I observed the following error message:
I investigated this error message as arising from the
wobble/interp
customC
code that uses theeigen
library. Within this path I spotted some suggestive code that could be extended to support GPUs:To be clear, the speed of wobble is not its primary limitation--- it runs reasonably fast on modern CPUs with typical high bandwidth echelle spectra. This exploration was merely out of curiosity to see if effortless improvement could be obtained by flipping a GPU switch. It seems that GPU support for wobble requires some careful examination of the
interp
extensions, and some understanding of GPUs on tensorflow.