-
Notifications
You must be signed in to change notification settings - Fork 27
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
Expression balancing #66
Comments
Hi @thesps! I think I have a possible implementation of the solution in francescobrivio@341627c (but further testing is needed on this preliminary implementation!) which drastically reduce the latency in case the So I think this can potentially be further improved if we can change this line:
to fill the scores in "reversed order", i.e. score_t scores[fn_classes(n_classes)][n_trees] , but I'm not sure if this requires much deeper changes in the code and/or if it's acceptable :D
What do you think? |
I have run a few tests using the same identical xgb model and changing the Conifer "version" and the ScorePrecision:
So I have to correct my previous post: in case of Note: |
Thanks for the development @francescobrivio this looks really promising! I think your proposal to swap the order of the indices of the As well as changing the newline += f' scores[{it}][{ic}] = tree_{it}_{ic}.decision_function(x);\n' |
Thanks for the feedback Sioni!
Considerations:
@thesps if you have further suggestions I'm happy to try them out! If not, and you agree, I can open a PR with these changes. |
Nice, this looks great to me. Please go ahead and open a PR 👍 |
Resolved by @francescobrivio in #68 |
The implementation of summation over tree scores in HLS backend prevents automatic expression balancing when saturation and rounding are used in the score precision type.
This should be replaced with a balanced tree reduce implementation.
The text was updated successfully, but these errors were encountered: