Skip to content

Commit

Permalink
add zero buffer check to predictor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Razdoburdin committed Nov 17, 2023
1 parent 4546a23 commit d0e086c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/sycl/predictor/predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ void DevicePredictInternal(::sycl::queue qu,
const gbm::GBTreeModel& model,
size_t tree_begin,
size_t tree_end) {
if (tree_end - tree_begin == 0) {
return;
}
if (tree_end - tree_begin == 0) return;
if (out_preds->HostVector().size() == 0) return;

DeviceModel device_model;
device_model.Init(qu, model, tree_begin, tree_end);

Expand Down

0 comments on commit d0e086c

Please sign in to comment.