scalanlp / breeze

Breeze is a numerical processing library for Scala.
www.scalanlp.org
Apache License 2.0
3.44k stars 691 forks source link

Using the Project Panama SIMD APIs #851

Closed alexklibisz closed 1 year ago

alexklibisz commented 1 year ago

Hi, this is perhaps less of an issue and more of a discussion. I'm curious if there has been any interest (or any efforts) in leveraging the Project Panama Vector APIs in this project? https://openjdk.org/jeps/426

dlwh commented 1 year ago

Hi Alex, @luhenry's netlib (which Breeze uses for BLAS) should automatically use the Vector APIs

If there's something missing, I'd be happy to review a PR or (more likely) send it over to luhenry... Realistically I'm not going to do anything myself though.

alexklibisz commented 1 year ago

Good to know, thank you! It's documented here, in case anyone else stumbles upon this: https://github.com/luhenry/netlib#vector-based-acceleration-for-java-16

Java 16 introduced the Vector API, a Java-based implementation providing access to hardware acceleration. VectorBLAS takes advantage of this API to implement most of the BLAS API.

The performance is on-par or above the native libraries on most Level-1 and Level-2 BLAS subroutines. For Level-3 BLAS subroutines, the performance still doesn't match native libraries (some thought on why).