Fix calling GPU predictor (#4836)

* Fix calling GPU predictor
This commit is contained in:
Jiaming Yuan
2019-09-05 19:09:38 -04:00
committed by GitHub
parent 52d44e07fe
commit a5f232feb8
5 changed files with 85 additions and 5 deletions

View File

@@ -49,6 +49,7 @@ class SimpleBatchIteratorImpl : public BatchIteratorImpl<T> {
};
BatchSet<SparsePage> SimpleDMatrix::GetRowBatches() {
// since csr is the default data structure so `source_` is always available.
auto cast = dynamic_cast<SimpleCSRSource*>(source_.get());
auto begin_iter = BatchIterator<SparsePage>(
new SimpleBatchIteratorImpl<SparsePage>(&(cast->page_)));