• Joan Fontanals's avatar
    Change locking strategy of Booster, allow for share and unique locks (#2760) · 1c35c3b9
    Joan Fontanals authored
    
    
    * Add capability to get possible max and min values for a model
    
    * Change implementation to have return value in tree.cpp, change naming to upper and lower bound, move implementation to gdbt.cpp
    
    * Update include/LightGBM/c_api.h
    Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
    
    * Change iteration to avoid potential overflow, add bindings to R and Python and a basic test
    
    * Adjust test values
    
    * Consider const correctness and multithreading protection
    
    * Put everything possible as const
    
    * Include shared_mutex, for now as unique_lock
    
    * Update test values
    
    * Put everything possible as const
    
    * Include shared_mutex, for now as unique_lock
    
    * Make PredictSingleRow const and share the lock with other reading threads
    
    * Update test values
    
    * Add test to check that model is exactly the same in all platforms
    
    * Try to parse the model to get the expected values
    
    * Try to parse the model to get the expected values
    
    * Fix implementation, num_leaves can be lower than the leaf_value_ size
    
    * Do not check for num_leaves to be smaller than actual size and get back to test with hardcoded value
    
    * Change test order
    
    * Add gpu_use_dp option in test
    
    * Remove helper test method
    
    * Remove TODO
    
    * Add preprocessing option to compile with c++17
    
    * Update python-package/setup.py
    Co-Authored-By: default avatarNikita Titov <nekit94-08@mail.ru>
    
    * Remove unwanted changes
    
    * Move option
    
    * Fix problems introduced by conflict fix
    
    * Avoid switching to c++17 and use yamc mutex library to access shared lock functionality
    
    * Add extra yamc include
    
    * Change header order
    
    * some lint fix
    
    * change include order and remove some extra blank lines
    
    * Further fix lint issues
    
    * Update c_api.cpp
    
    * Further fix lint issues
    
    * Move yamc include files to a new yamc folder
    
    * Use standard unique_lock
    
    * Update windows/LightGBM.vcxproj
    Co-authored-by: default avatarGuolin Ke <guolin.ke@outlook.com>
    
    * Update windows/LightGBM.vcxproj.filters
    Co-authored-by: default avatarGuolin Ke <guolin.ke@outlook.com>
    
    * Update windows/LightGBM.vcxproj.filters
    Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
    
    * Update windows/LightGBM.vcxproj.filters
    Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
    
    * Update windows/LightGBM.vcxproj.filters
    Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
    
    * Fix problems coming from merge conflict resolution
    Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
    Co-authored-by: default avatarjoanfontanals <jfontanals@ntent.com>
    Co-authored-by: default avatarGuolin Ke <guolin.ke@outlook.com>
    1c35c3b9
c_api.cpp 94.9 KB