[backport] Fix threads in DMatrix slice. (#8667) (#8679)

This commit is contained in:
Jiaming Yuan
2023-01-14 18:46:04 +08:00
committed by GitHub
parent 10bb0a74ef
commit e5bef4ffce
2 changed files with 24 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ DMatrix* SimpleDMatrix::Slice(common::Span<int32_t const> ridxs) {
out->Info() = this->Info().Slice(ridxs);
out->Info().num_nonzero_ = h_offset.back();
}
out->ctx_ = this->ctx_;
return out;
}