Skip to content

Commit 7c14732

Browse files
authored
mark InitOutPrediction virtual (#25)
Co-authored-by: Dmitry Razdoburdin <>
1 parent b2f59a8 commit 7c14732

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/xgboost/predictor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class Predictor {
9292
* \param out_predt Prediction vector to be initialized.
9393
* \param model Tree model used for prediction.
9494
*/
95-
void InitOutPredictions(const MetaInfo& info, HostDeviceVector<bst_float>* out_predt,
96-
const gbm::GBTreeModel& model) const;
95+
virtual void InitOutPredictions(const MetaInfo& info, HostDeviceVector<bst_float>* out_predt,
96+
const gbm::GBTreeModel& model) const;
9797

9898
/**
9999
* \brief Generate batch predictions for a given feature matrix. May use

plugin/sycl/predictor/predictor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class Predictor : public xgboost::Predictor {
233233
protected:
234234
void InitOutPredictions(const MetaInfo& info,
235235
HostDeviceVector<bst_float>* out_preds,
236-
const gbm::GBTreeModel& model) const {
236+
const gbm::GBTreeModel& model) const override {
237237
CHECK_NE(model.learner_model_param->num_output_group, 0);
238238
size_t n = model.learner_model_param->num_output_group * info.num_row_;
239239
const auto& base_margin = info.base_margin_.Data()->HostVector();

0 commit comments

Comments
 (0)