-
Notifications
You must be signed in to change notification settings - Fork 540
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
[REVIEW] Fix for crash in RF when max_leaves
parameter is specified
#4126
[REVIEW] Fix for crash in RF when max_leaves
parameter is specified
#4126
Conversation
…of isLeaf across entire threadblock
Minimal performance regression observed overall, no loss of accuracy.
For
For
The GBM-bench parameter file used for benchmarking can be located here. |
max_leaves
parameter is specifiedmax_leaves
parameter is specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome fix vinay! 🙏🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. Thank you Vinay and Venkat for the fix.
@gpucibot merge |
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #4126 +/- ##
===============================================
Coverage ? 85.91%
===============================================
Files ? 232
Lines ? 18377
Branches ? 0
===============================================
Hits ? 15788
Misses ? 2589
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
…i#4126) Fixes issue rapidsai#4046. In the `nodeSplitKernel` each thread calls `leafBasedOnParams()` which reads global variable `n_leaves`. Different threads from same threadblock read `n_leaves` at different times. Between two threads reading `n_leaves`, value of it could be changed by some other threadblock. Thus one or few threads might concluded that `max_leaves` is reached, and rest of the threads might conclude otherwise. This caused crash in partitioning the samples. In the solution provided here, instead of every thread reading `n_leaves`, only one thread from a threadblock reads the value and broadcasts it to every other thread via shared memory. This ensures complete agreement on `max_leaves` criterion among threads from threadblock. Performance results to be posted shortly. Authors: - Vinay Deshpande (https://github.com/vinaydes) Approvers: - Venkat (https://github.com/venkywonka) - Rory Mitchell (https://github.com/RAMitchell) - Thejaswi. N. S (https://github.com/teju85) URL: rapidsai#4126
Fixes issue #4046.
In the
nodeSplitKernel
each thread callsleafBasedOnParams()
which reads global variablen_leaves
. Different threads from same threadblock readn_leaves
at different times. Between two threads readingn_leaves
, value of it could be changed by some other threadblock. Thus one or few threads might concluded thatmax_leaves
is reached, and rest of the threads might conclude otherwise. This caused crash in partitioning the samples.In the solution provided here, instead of every thread reading
n_leaves
, only one thread from a threadblock reads the value and broadcasts it to every other thread via shared memory. This ensures complete agreement onmax_leaves
criterion among threads from threadblock.Performance results to be posted shortly.