-
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] Add L1 regression objective for cuda_exp #5457
Conversation
update log in test_register_logger
…oft/LightGBM into cuda/objective-regression
SynchronizeCUDADevice(__FILE__, __LINE__); | ||
} | ||
|
||
template <> |
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.
empty template?
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.
This is for template instantiation.
label_t* cuda_trans_label_; | ||
double* cuda_block_buffer_; | ||
CUDAVector<label_t> cuda_trans_label_; | ||
CUDAVector<double> cuda_block_buffer_; |
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.
cuda_labels_ and cuda_weights_ is label_t*
type, why these two are CUDAVector
?
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.
cuda_labels_ and cuda_weights_ are just pointers to memory allocated by Metadata class, not allocated by the objective class. So we simply use pointers.
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.
some minor comments
@@ -69,6 +69,126 @@ void CUDARegressionL2loss::LaunchGetGradientsKernel(const double* score, score_t | |||
} | |||
|
|||
|
|||
double CUDARegressionL1loss::LaunchCalcInitScoreKernel() const { | |||
const double alpha = 0.9f; |
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.
@shiyu1994 Why did you use 0.9
here while if I'm not mistaken original CPU implementation uses 0.5
?
const double alpha = 0.5; |
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. |
Add L1 regression objective for cuda_exp. This PR also includes implementations of basic CUDA algorithms like quantile calculation and more forms of bitonic sort.