synaptic icon indicating copy to clipboard operation
synaptic copied to clipboard

GPU Acceleration with gpu.js

Open LoopControl opened this issue 8 years ago • 4 comments

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 )

LoopControl avatar Jul 15 '17 04:07 LoopControl

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)

Jabher avatar Jul 15 '17 10:07 Jabher

@LoopControl For me, it's only 4 times. (Yet, I'm cheating, the browser is running on the Intel GPU, not the NVidia one.)

AlexisTM avatar Aug 04 '17 21:08 AlexisTM

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.

wagenaartje avatar Aug 05 '17 09:08 wagenaartje

And, as an example, onde would get Synaptic or Neataptic runing through GPU.js ? Any example would be great.

talvasconcelos avatar Mar 05 '18 18:03 talvasconcelos