-
Notifications
You must be signed in to change notification settings - Fork 513
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
Optimize dtype conversion for FIL #4070
Optimize dtype conversion for FIL #4070
Conversation
nice! much better than current state |
Thanks for looking into this! Thinking further: I think the conversion (implemented on the GPU) can be fast even with the accuracy check enabled. |
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.
Looks great! Very nice improvement. Just a grammatical issue in 2 places in the docstrings, but otherwise everything looks perfect to me.
Co-authored-by: William Hicks <wphicks@users.noreply.github.com>
rerun tests |
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.
LGTM
@gpucibot merge |
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #4070 +/- ##
===============================================
Coverage ? 85.83%
===============================================
Files ? 231
Lines ? 18272
Branches ? 0
===============================================
Hits ? 15684
Misses ? 2588
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
cc @canonizer @levsnv @wphicks After doing a little bit of profiling for the slowness we observed for FIL when data had to be converted from int16 to float32 I found out that ~98% of the time was being spent in the check of whether there would be information lost to under/overflows in https://github.com/rapidsai/cuml/blob/c3c4376ab8a3af3e0c92aa2c9ae5d8b8fe116b8c/python/cuml/common/input_utils.py#L590 Created this proposal PR to add a parameter to skip that check in methods that are fast enough to benefit from fast dtype conversion like FIL as well as skip the check when upcasting. In my first quick benchmarks the dtype conversion was between **4x~14x** faster when disabling the checks in some cases. PR is still in progress, but figured I'd ping you in case you wanted to take a look Authors: - Dante Gama Dessavre (https://github.com/dantegd) Approvers: - William Hicks (https://github.com/wphicks) - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#4070
cc @canonizer @levsnv @wphicks
After doing a little bit of profiling for the slowness we observed for FIL when data had to be converted from int16 to float32 I found out that ~98% of the time was being spent in the check of whether there would be information lost to under/overflows in
cuml/python/cuml/common/input_utils.py
Line 590 in 3c11ebd
Created this proposal PR to add a parameter to skip that check in methods that are fast enough to benefit from fast dtype conversion like FIL as well as skip the check when upcasting.
In my first quick benchmarks the dtype conversion was between 4x~14x faster when disabling the checks in some cases. PR is still in progress, but figured I'd ping you in case you wanted to take a look