Open LoopControl opened 6 years ago
There are several different implementations of gpgpu, this one is really pretty, but it has an issue - there's ton of overhead due to parsing of js and then wrapping it into a code. Cazala planned to use weblas (afaik)
@LoopControl For me, it's only 4 times. (Yet, I'm cheating, the browser is running on the Intel GPU, not the NVidia one.)
GPU.js seems pretty awesome, but it's not always faster: https://jsfiddle.net/zkL3av3o/1/ (change matrixSize
to your needs). The benchmark also runs without taking the time to initialise a kernel into account.
So it's definitely faster for larger vectors / matrices, but you'd need some kind of check to predict if running on GPU is faster.
And, as an example, onde would get Synaptic or Neataptic runing through GPU.js ? Any example would be great.
There's a new library that seems to do matrix math on the GPU via webGL. Their benchmark on the homepage shows about an 18X speed increase compared to CPU. Maybe Synaptic could use it?
http://gpu.rocks/ (Github here: https://github.com/gpujs/gpu.js )