Porting elementwise metrics to GPU. (#3952)

* Port elementwise metrics to GPU.

* All elementwise metrics are converted to static polymorphic.
* Create a reducer for metrics reduction.
* Remove const of Metric::Eval to accommodate CubMemory.
This commit is contained in:
Jiaming Yuan
2018-12-01 18:46:45 +13:00
committed by GitHub
parent a9d684db18
commit 48dddfd635
14 changed files with 605 additions and 279 deletions

View File

@@ -49,7 +49,7 @@ void CheckRankingObjFunction(xgboost::ObjFunction * obj,
xgboost::bst_float GetMetricEval(
xgboost::Metric * metric,
std::vector<xgboost::bst_float> preds,
xgboost::HostDeviceVector<xgboost::bst_float> preds,
std::vector<xgboost::bst_float> labels,
std::vector<xgboost::bst_float> weights = std::vector<xgboost::bst_float> ());