pan3793 commented on code in PR #49986:
URL: https://github.com/apache/spark/pull/49986#discussion_r1958982565


##########
mllib-local/src/main/scala/org/apache/spark/ml/linalg/BLAS.scala:
##########
@@ -39,8 +39,11 @@ private[spark] object BLAS extends Serializable {
   // For level-3 routines, we use the native BLAS.
   private[spark] def nativeBLAS: NetlibBLAS = {
     if (_nativeBLAS == null) {
-      _nativeBLAS =
-        try { NetlibNativeBLAS.getInstance } catch { case _: Throwable => 
javaBLAS }
+      _nativeBLAS = System.getProperty("spark.ml.allowNativeBlas", "true") 
match {

Review Comment:
   Ideally, I think we should propagate the conf via `SparkConf`, and change 
the method signature to
   
   ```patch
   - def nativeBLAS: NetlibBLAS
   + def nativeBLAS(allowNative: Boolean): NetlibBLAS
   ```
   
   but I found many places call `BLAS.nativeBLAS` where `SparkConf` is 
unavailable, so I proposed to use sys property.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to