You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/09/02 01:31:26 UTC

[PR] [SPARK-59162][ML] Replace BLAS calls with while loops in GBT models [spark]

zhengruifeng opened a new pull request, #58461:
URL: https://github.com/apache/spark/pull/58461

   ### What changes were proposed in this pull request?
   
   Replace the BLAS dot products in `GBTClassificationModel.margin` and
   `GBTRegressionModel.predict` with indexed `while` loops that accumulate each tree prediction and
   weight directly. Remove the now-unused BLAS imports.
   
   ### Why are the changes needed?
   
   The BLAS calls first allocate an array containing every tree prediction and then invoke native BLAS
   for a small dot product on every model prediction. Direct accumulation avoids the temporary array
   and native-call overhead, reducing prediction overhead and Spark Connect server pressure.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   The existing GBT classifier and regressor suites passed:
   
   ```
   build/sbt 'mllib/testOnly org.apache.spark.ml.classification.GBTClassifierSuite'
   build/sbt 'mllib/testOnly org.apache.spark.ml.regression.GBTRegressorSuite'
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)
   


-- 
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-unsubscribe@spark.apache.org

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


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


Re: [PR] [SPARK-59162][ML] Replace BLAS calls with while loops in GBT models [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #58461:
URL: https://github.com/apache/spark/pull/58461#issuecomment-5504858603

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/9b817929e3b77d88f6cb9f94d82b50b50290105e
   - merged into branch-4.x https://github.com/apache/spark/commit/c49726f21ba9553513261fa0d62796d0f7a4f952
   
   *Posted by `merge_spark_pr.py`*


-- 
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-unsubscribe@spark.apache.org

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


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


Re: [PR] [SPARK-59162][ML] Replace BLAS calls with while loops in GBT models [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #58461: [SPARK-59162][ML] Replace BLAS calls with while loops in GBT models
URL: https://github.com/apache/spark/pull/58461


-- 
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-unsubscribe@spark.apache.org

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


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