Skip to content

Commit

Permalink
cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 11, 2023
1 parent ba358af commit a6202d0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions src/data/ellpack_page_raw_format.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class EllpackPageRawFormat : public SparsePageFormat<EllpackPage> {
if (!fi->Read(&impl->base_rowid)) {
return false;
}
std::cout << "impl brd:" << impl->base_rowid << std::endl;
return true;
}

Expand All @@ -42,7 +41,6 @@ class EllpackPageRawFormat : public SparsePageFormat<EllpackPage> {
bytes += sizeof(impl->is_dense);
fo->Write(impl->row_stride);
bytes += sizeof(impl->row_stride);
std::cout << "write brd:" << impl->base_rowid << std::endl;
CHECK(!impl->gidx_buffer.ConstHostVector().empty());
fo->Write(impl->gidx_buffer.HostVector());
bytes += impl->gidx_buffer.ConstHostSpan().size_bytes() + sizeof(uint64_t);
Expand Down
1 change: 0 additions & 1 deletion src/data/ellpack_page_source.cu
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ void EllpackPageSource::Fetch() {
auto *impl = this->page_->Impl();
*impl = EllpackPageImpl(device_, *cuts_, *csr, is_dense_, row_stride_, feature_types_);
page_->SetBaseRowId(csr->base_rowid);
std::cout << "csr br:" << csr->base_rowid << std::endl;
this->WriteCache();
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/data/sparse_page_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class SparsePageSourceImpl : public BatchIteratorImpl<S> {
}
// An heuristic for number of pre-fetched batches. We can make it part of BatchParam
// to let user adjust number of pre-fetched batches when needed.
uint32_t constexpr kPreFetch = 1;
uint32_t constexpr kPreFetch = 4;

size_t n_prefetch_batches = std::min(kPreFetch, n_batches_);
CHECK_GT(n_prefetch_batches, 0) << "total batches:" << n_batches_;
Expand All @@ -140,7 +140,6 @@ class SparsePageSourceImpl : public BatchIteratorImpl<S> {

std::uint64_t offset = self->cache_info_->offset.at(fetch_it);
std::uint64_t length = self->cache_info_->bytes.at(fetch_it);
// std::cout << typeid(S).name() << " offset:" << offset << " length:" << length << std::endl;

auto fi = std::make_unique<common::PrivateMmapStream>(n, true, offset, length);
CHECK(fmt->Read(page.get(), fi.get()));
Expand Down

0 comments on commit a6202d0

Please sign in to comment.