Skip to content

Commit

Permalink
Fix empty partition. (dmlc#10559)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 15, 2024
1 parent 8674e46 commit d588086
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common/hist_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ void BuildHistDispatch(Span<GradientPair const> gpair, Span<bst_idx_t const> row
return;
}
// contiguous memory access, built-in HW prefetching is enough
if (row_indices.size() == 0) {
return;
}
RowsWiseBuildHistKernel<false, BuildingManager>(gpair, row_indices, gmat, hist);
} else {
auto span1 = row_indices.subspan(0, row_indices.size() - no_prefetch_size);
Expand Down

0 comments on commit d588086

Please sign in to comment.