Skip to content
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

Merged
merged 21 commits into from
Sep 1, 2022

Conversation

shiyu1994
Copy link
Collaborator

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.

SynchronizeCUDADevice(__FILE__, __LINE__);
}

template <>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty template?

Copy link
Collaborator Author

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_;
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

@guolinke guolinke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments

@shiyu1994 shiyu1994 merged commit d78b6bc into master Sep 1, 2022
@shiyu1994 shiyu1994 deleted the cuda/objective-regression branch September 1, 2022 13:51
@@ -69,6 +69,126 @@ void CUDARegressionL2loss::LaunchGetGradientsKernel(const double* score, score_t
}


double CUDARegressionL1loss::LaunchCalcInitScoreKernel() const {
const double alpha = 0.9f;
Copy link
Collaborator

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;

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants