Lazy initialization of device vector. (#5173)
* Lazy initialization of device vector. * Fix #5162. * Disable copy constructor of HostDeviceVector. Prevents implicit copying. * Fix CPU build. * Bring back move assignment operator.
This commit is contained in:
@@ -339,6 +339,7 @@ class GPUPredictor : public xgboost::Predictor {
|
||||
// the first step only modifies prediction store in learner without following code.
|
||||
InitOutPredictions(cache_emtry->second.data->Info(),
|
||||
&(cache_emtry->second.predictions), model);
|
||||
CHECK_EQ(cache_emtry->second.predictions.Size(), out_preds->Size());
|
||||
cache_emtry->second.predictions.Copy(*out_preds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user