-
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 lambdarank objective for cuda_exp #5453
Conversation
src/objective/objective_function.cpp
Outdated
@@ -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."); |
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.
remove this warning?
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.
Done via 573bfd5
} | ||
|
||
template <data_size_t NUM_RANK_LABEL> | ||
__global__ void GetGradientsKernel_LambdarankNDCG_Sorted( |
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.
differences compared with non sorted one?
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.
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.
Co-authored-by: Nikita Titov <[email protected]>
Co-authored-by: Nikita Titov <[email protected]>
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.
Thanks for fixing #ifndef
guards!
I don't have any other comments for this PR.
✔️
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 lambdarank objective for
cuda_exp
(#5163).rank_xendcg
will be added forcuda_exp
after this PR is merged.