diff --git a/plugin/sycl/common/hist_util.cc b/plugin/sycl/common/hist_util.cc index 4edc9768b3e1..45e9322f2f99 100644 --- a/plugin/sycl/common/hist_util.cc +++ b/plugin/sycl/common/hist_util.cc @@ -55,6 +55,7 @@ void GHistIndexMatrix::SetIndexData(::sycl::queue qu, size_t nbins, size_t row_stride, uint32_t* offsets) { + if (hit_count.size() == 0) return 0; const xgboost::Entry *data_ptr = dmat_device.data.DataConst(); const bst_row_t *offset_vec = dmat_device.row_ptr.DataConst(); const size_t num_rows = dmat_device.row_ptr.Size() - 1; diff --git a/plugin/sycl/tree/updater_quantile_hist.cc b/plugin/sycl/tree/updater_quantile_hist.cc index 289204d1eca0..d22c854a56ae 100644 --- a/plugin/sycl/tree/updater_quantile_hist.cc +++ b/plugin/sycl/tree/updater_quantile_hist.cc @@ -627,7 +627,7 @@ bool QuantileHistMaker::Builder::UpdatePredictionCache( const size_t stride = out_preds.Stride(0); const int buffer_size = out_preds.Size()*stride - stride + 1; - if (buffer_size == 0) return; + if (buffer_size == 0) return true; ::sycl::buffer out_preds_buf(&out_preds(0), buffer_size); size_t n_nodes = row_set_collection_.Size();