-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/optimize single prediction (#2992)
* [performance] Add Fast methods to C API for SingleRow Predictions * Add methods to C API to make single-row predictions faster: - LGBM_BoosterPredictForMatSingleRowFastInit (setup) - LGBM_BoosterPredictForMatSingleRowFast (predict) - LGBM_FastConfigFree (cleanup setup outputs) * Code syle cleanup * Fix lint errors * [performance] Revert FastConfig improvement to pass data at init This reduces optimization by 5% / 30% with this branch but makes it so it can be used for higher level wrappers in MMLSpark. And outside it as well. * [performance] Introduce Fast variants for SingleRow predictors. Although this already provides performance gains by itself for any callers, two new functions were added to Java's SWIG interfaces to exploit that AND the GetPrimitiveArrayCritical data fetches. * [tests/profiling] Profile Fast predict methods Build with -DBUILD_PROFILING_TESTS=ON and copy the default model trained on the Higgs dataset from the benchmarks repo https://github.com/guolinke/boosting_tree_benchmarks.git to LightGBM repo root and run the lightgbm_profile_* binaries. The single instance used is the first row from that dataset. * Update comment on CMakeLists. * Fix doxygen-introduced issue (#threads) * Fix conflicts due to new RowFunctionFromCSR signature in master * Change FastConfig ncol to int32_t. * Removed profiling folder * fix doxygen typo include/LightGBM/c_api.h Co-authored-by: Nikita Titov <[email protected]> * fix doxygen typo include/LightGBM/c_api.h Co-authored-by: Nikita Titov <[email protected]> * fix doxygen typo include/LightGBM/c_api.h Co-authored-by: Nikita Titov <[email protected]> * Doxygen: change new docstrings to double back-quote Co-authored-by: alberto.ferreira <[email protected]> Co-authored-by: Nikita Titov <[email protected]>
- Loading branch information
1 parent
87d4648
commit fc79b36
Showing
3 changed files
with
309 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters