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 lambdarank objective for cuda_exp #5453

Merged
merged 8 commits into from
Sep 5, 2022

Conversation

shiyu1994
Copy link
Collaborator

Add lambdarank objective for cuda_exp (#5163). rank_xendcg will be added for cuda_exp after this PR is merged.

@@ -39,7 +40,7 @@ ObjectiveFunction* ObjectiveFunction::CreateObjectiveFunction(const std::string&
return new CUDABinaryLogloss(config);
} else if (type == std::string("lambdarank")) {
Log::Warning("Objective lambdarank is not implemented in cuda_exp version. Fall back to boosting on CPU.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this warning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done via 573bfd5

}

template <data_size_t NUM_RANK_LABEL>
__global__ void GetGradientsKernel_LambdarankNDCG_Sorted(
Copy link
Collaborator

Choose a reason for hiding this comment

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

differences compared with non sorted one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GetGradientsKernel_LambdarankNDCG_Sorted does not sort the items. GetGradientsKernel_LambdarankNDCG sorts the items in shared memory. These two are for different numbers of items in a query. When a query contains too many items, the sorting cannot be performed in shared memory. Thus a sorting is done separately, and then GetGradientsKernel_LambdarankNDCG_Sorted is used.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

Thanks for fixing #ifndef guards!
I don't have any other comments for this PR.

✔️

@shiyu1994 shiyu1994 merged commit 1d5f46f into master Sep 5, 2022
@shiyu1994 shiyu1994 deleted the cuda/objective-ranking branch September 5, 2022 02:11
@jameslamb jameslamb mentioned this pull request Oct 7, 2022
40 tasks
@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