-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not predict with multithread? #6464
Comments
Thanks for using LightGBM. The You can pass If you are predicting on only one row at a time, using multithreading won't improve the prediction speed and you'll only ever see one CPU core active. |
Thanks for your answer. There is a parameter in LGBM_BoosterPredictForMatSingleRowFastInit: I found that no matter whether you choose C_API_DTYPE_FLOAT32 or C_API_DTYPE_FLOAT64, the internal processing is based on double. |
Can you share some links or other evidence that makes you think this? |
During the prediction process, moving from the root node to a leaf node requires discrete access to a double-type feature array, which will cause cache miss. |
Ok, we'd really appreciate specific evidence for the claim you're making (like links to the relevant parts of LightGBM's code). Otherwise, you're asking someone to do investigation that you've already done. |
If parameter tree_learner in my model.txt is serial, can each tree in this model be predicted using multiple threads?
when I test it, I found only one thread with 100% CPU usage, all the otheer thread had zero CPU usage.
The text was updated successfully, but these errors were encountered: