fommil commented on a change in pull request #30810:
URL: https://github.com/apache/spark/pull/30810#discussion_r626335537



##########
File path: mllib-local/src/main/scala/org/apache/spark/ml/linalg/BLAS.scala
##########
@@ -18,28 +18,51 @@
 package org.apache.spark.ml.linalg
 
 import com.github.fommil.netlib.{BLAS => NetlibBLAS, F2jBLAS}
-import com.github.fommil.netlib.BLAS.{getInstance => NativeBLAS}
 
 /**
  * BLAS routines for MLlib's vectors and matrices.
  */
 private[spark] object BLAS extends Serializable {
 
-  @transient private var _f2jBLAS: NetlibBLAS = _
+  @transient private var _javaBLAS: NetlibBLAS = _
   @transient private var _nativeBLAS: NetlibBLAS = _
   private val nativeL1Threshold: Int = 256

Review comment:
       "small speed up of native for the level-1 and level-2 routines." I think 
you need to do some more analysis on this. Native can be 10x faster than JVM 
for reasonable sized matrices. However, as shown in 
https://github.com/fommil/matrix-toolkits-java the EJML and common-math project 
are faster for matrices of 10x10 or smaller. If you want to heavily optimise 
for those usecases, then swap to using EJML which is heavily optimised for that 
usecase (not just "something on the JVM")




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to