Remove accidental SparsePage copies (#3583)
This commit is contained in:
committed by
Philip Hyunsu Cho
parent
0b607fb884
commit
645996b12f
@@ -236,7 +236,7 @@ class CPUPredictor : public Predictor {
|
||||
auto iter = p_fmat->RowIterator();
|
||||
iter->BeforeFirst();
|
||||
while (iter->Next()) {
|
||||
auto batch = iter->Value();
|
||||
auto &batch = iter->Value();
|
||||
// parallel over local batch
|
||||
const auto nsize = static_cast<bst_omp_uint>(batch.Size());
|
||||
#pragma omp parallel for schedule(static)
|
||||
@@ -285,7 +285,7 @@ class CPUPredictor : public Predictor {
|
||||
const std::vector<bst_float>& base_margin = info.base_margin_;
|
||||
iter->BeforeFirst();
|
||||
while (iter->Next()) {
|
||||
auto batch = iter->Value();
|
||||
auto &batch = iter->Value();
|
||||
// parallel over local batch
|
||||
const auto nsize = static_cast<bst_omp_uint>(batch.Size());
|
||||
#pragma omp parallel for schedule(static)
|
||||
|
||||
@@ -64,7 +64,7 @@ struct DeviceMatrix {
|
||||
iter->BeforeFirst();
|
||||
size_t data_offset = 0;
|
||||
while (iter->Next()) {
|
||||
auto batch = iter->Value();
|
||||
auto &batch = iter->Value();
|
||||
// Copy row ptr
|
||||
dh::safe_cuda(cudaMemcpy(
|
||||
row_ptr.Data() + batch.base_rowid, batch.offset.data(),
|
||||
|
||||
Reference in New Issue
Block a user