Fix wrapping GPU ID and prevent data copying. (#5160)
* Removed some data copying. * Make sure gpu_id is valid before any configuration is carried out.
This commit is contained in:
@@ -46,7 +46,7 @@ void CheckObjFunctionImpl(std::unique_ptr<xgboost::ObjFunction> const& obj,
|
||||
std::vector<xgboost::bst_float> preds,
|
||||
std::vector<xgboost::bst_float> labels,
|
||||
std::vector<xgboost::bst_float> weights,
|
||||
xgboost::MetaInfo info,
|
||||
xgboost::MetaInfo const& info,
|
||||
std::vector<xgboost::bst_float> out_grad,
|
||||
std::vector<xgboost::bst_float> out_hess) {
|
||||
xgboost::HostDeviceVector<xgboost::bst_float> in_preds(preds);
|
||||
|
||||
Reference in New Issue
Block a user