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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
