News for hackers. Stuff that matters.
Re:MNIST training: Showdown between JavaScript and WebAssembly by nsthorat on Sunday March 11, 2018 @01:58PM (#16564009)
We've done some initial tests ourselves. WASM doesn't yet support SIMD so WebGL tends to be 5-10x faster. SIMD is actively being worked on by many smart people in Chromium / other browsers, so I would expect to see huge wins in the near term future. When that happens, deeplearn.js will have a WASM backend. WASM has a much better memory management story (destructors on the C++ side) so I'm super excited about its future.
Re:MNIST training: Showdown between JavaScript and WebAssembly by seanmcdirmid on Sunday March 11, 2018 @03:03PM (#16564270)
Is SIMD going to close that performance gap for a problem that otherwise fits well on a GPU? Wouldn't the ideal by WASM support for GPU access?
Re:MNIST training: Showdown between JavaScript and WebAssembly by fulafel on Sunday March 11, 2018 @03:28PM (#16564367)
Indeed WASM supports GPU access through the normal JS WebGL API. Many asm.js/WebAssembly apps use the GPU in this way.

Though compiling WebAssembly to GPU code would be a very interesting thing to explore, too.

Re:MNIST training: Showdown between JavaScript and WebAssembly by nsthorat on Sunday March 11, 2018 @03:48PM (#16564447)
This probably won't buy you anything. The API you still have is WebGL, and JS is not the bottleneck.
Re:MNIST training: Showdown between JavaScript and WebAssembly by make3 on Sunday March 11, 2018 @05:02PM (#16564762)
GPUs are at least an order of magnitude faster at training neural nets than CPUs. This is why companies like Google very large amounts of multi-thousand dollar GPUs like the Tesla V100. If cpu WASM is ever faster than WebGL, it's just that the webGL implementation is suboptimal (or that WebGL has too much overhead for real GPU compute)