Skip to content

Commit

Permalink
fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 19, 2023
1 parent 7aeb305 commit 8be4326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gbm/gbtree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ GBTree::GetPredictor(HostDeviceVector<float> const *out_pred,

// Data comes from SparsePageDMatrix. Since we are loading data in pages, no need to
// prevent data copy.
if (!f_dmat->SingleColBlock()) {
if (f_dmat && !f_dmat->SingleColBlock()) {
if (ctx_->IsCPU()) {
return cpu_predictor_;
} else {
Expand Down

0 comments on commit 8be4326

Please sign in to comment.