News for hackers. Stuff that matters.
Re:How to write efficient matrix multiplication by hadibrais on Sunday May 27, 2018 @02:45PM (#17168403)
Sparse matrix multiplication is generally considered to be a different problem. Sparse matrices need to be represented differently (See https://en.wikipedia.org/wiki/Sparse_matrix for an introduction). There has been recently a lot of research on how to do sparse matrix multiplication efficiently on manycore architectures. See this 2018 paper for example: https://arxiv.org/pdf/1804.01698.pdf. Note that sparse matrix-vector multiplication is also a different problem.
Re:How to write efficient matrix multiplication by nautilus12 on Sunday May 27, 2018 @02:51PM (#17168442)
Thats fascinating, i wonder how much coordinate matrix multiplication in spark takes into account factors like choelesky decomposition. Noticed most of those libraries are written in C++ or fortran, is JVM based approaches generally discouraged in this realm? It fits well with our current stack based mostly around spark
Re:How to write efficient matrix multiplication by hadibrais on Sunday May 27, 2018 @03:03PM (#17168518)
I don't much about Java. But, for example, if you want to implement the technique from the link above in Java, you'd need LoadFloat8, BroadcastFloat8, and AdduFloat8. I'm not sure how they are implemented in Glow, but they can be implemented using inline assembly. You'd need something like SIMD intrinsics Java library to access these crucial x86 SIMD instructions.
Re:How to write efficient matrix multiplication by twic on Sunday May 27, 2018 @08:30PM (#17169951)
There's a proposal to add SIMD intrinsics to Java (sort of), but i have no idea when it might happen:

https://bugs.openjdk.java.net/browse/JDK-8201271

Re:How to write efficient matrix multiplication by joshuamorton on Sunday May 27, 2018 @03:02PM (#17168511)
Not quite the same, but similar, see the flowcharts at the end of this [1].

[1]: https://www.mathworks.com/help/matlab/ref/mldivide.html