-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[CUDA] New CUDA version Part 1 #4630
[CUDA] New CUDA version Part 1 #4630
Conversation
stop when no leaf to split
I'll continue skimming files later today. |
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.
Are there any plans for sharing numbers for benchmarks?
https://lightgbm.readthedocs.io/en/latest/Experiments.html
https://lightgbm.readthedocs.io/en/latest/GPU-Performance.html
@StrikerRUS Thanks for the comments. Could you please check the latest updates? |
Gently ping @StrikerRUS again. Thanks for your time. |
@shiyu1994 Please consider checking this my suggestion #4630 (comment) about adding a comment in CI script. Also, could you please comment of this question (doesn't affect merging of this PR)?
Please open a new issue for supporting subset. |
Sure! We will release the benchmark results when the whole new CUDA version is merged. |
Thanks for the reminder. Comment added. |
#5086 is opened for recording. |
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.
Thank you so so much for extremely hard work!
I don't have any other comments based on what I've seen and understood in the code.
Do we still want to merge #4827 before this PR? |
@StrikerRUS Given that #4827 has not passed all the tests in Azure Pipeline, I think we can merge this one first. I'll fix the problems in #4827 ASAP. |
I'm going to merge this. Thank @guolinke @StrikerRUS @jameslamb for your help! |
thank you @shiyu1994 so much ! |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Description
This is the first part of decomposed PR #4528, which only contains the single-GPU part of new CUDA version. Subsequent PRs will include:
CUDARowData
when row subsampling and column subsampling with small fractions.For this PR, let's focus on the implementation of tree learner on single-GPU with CUDA.
Implementation
The main part of implementation is in
src/treelearner/cuda
. 4 core classes are implemented:CUDASingleGPUTreeLearner
: which inheritsSerialTreeLearner
. Defines the overall training logic of a single tree.CUDAHistogramConstructor
, defines the histogram construction on CUDA. The CPU counterpart is the histogram construction functions insrc/io/dataset.cpp
.CUDADataPartition
, defines how training data are mapped to different leaves during the training of a tree. The CPU counterpart isDataPartition
insrc/treelearner/data_partition.hpp
.CUDABestSplitFinder
, defines how best split threshold is found from a constructed histogram. The CPU counterpart is best threshold find methods insrc/treelearner/feature_histogram.hpp
.Besides, we also have two new classes for storing data on GPU:
CUDARowData
: implements insrc/io/cuda/cuda_row_data.cpp
. Stores the data on GPU in a row-wise manner. Used inCUDAHistogramConstructor
.CUDAColData
: implements insrc/io/cuda/cuda_col_data.cpp
. Stores the data on GPU in a col-wise manner. Used inCUDADataPartition
.The basic logic of this PR:
CUDASingleTreeLearner
will train a new tree with the gradients by calling methods ofCUDAHistogramConstructor
to construct the histograms,CUDABestSplitFinder
to find the best thresholds, andCUDADataPartition
to partition the data according to the best split, iteratively. (See https://github.com/shiyu1994/LightGBM/blob/536f603bd9f5d4fa1170db41c5c1b6d6d22f67d0/src/treelearner/cuda/cuda_single_gpu_tree_learner.cpp#L115-L223)