Skip to content

Commit

Permalink
Ranking metric acceleration on the gpu (#5398)
Browse files Browse the repository at this point in the history
  • Loading branch information
sriramch authored Mar 22, 2020
1 parent cd7d6f7 commit d2231fc
Show file tree
Hide file tree
Showing 5 changed files with 747 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/metric/metric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,8 @@ namespace metric {
DMLC_REGISTRY_LINK_TAG(elementwise_metric);
DMLC_REGISTRY_LINK_TAG(multiclass_metric);
DMLC_REGISTRY_LINK_TAG(rank_metric);
#ifdef XGBOOST_USE_CUDA
DMLC_REGISTRY_LINK_TAG(rank_metric_gpu);
#endif
} // namespace metric
} // namespace xgboost
2 changes: 1 addition & 1 deletion src/metric/rank_metric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ struct EvalAuc : public Metric {
!info.group_ptr_.empty() && info.weights_.Size() != info.num_row_;

// Check if we have a GPU assignment; else, revert back to CPU
if (tparam_->gpu_id >= 0 && is_ranking_task) {
if (tparam_->gpu_id >= 0) {
if (!auc_gpu_) {
// Check and see if we have the GPU metric registered in the internal registry
auc_gpu_.reset(GPUMetric::CreateGPUMetric(this->Name(), tparam_));
Expand Down
Loading

0 comments on commit d2231fc

Please sign in to comment.