Update GPU code with dmatrix changes (#3117)

This commit is contained in:
Rory Mitchell 2018-02-17 12:11:48 +13:00 committed by GitHub
parent 10eb05a63a
commit dd82b28e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -651,9 +651,9 @@ class GPUMaker : public TreeUpdater {
fId->reserve(nCols * nRows);
// in case you end up with a DMatrix having no column access
// then make sure to enable that before copying the data!
if (!dmat->HaveColAccess()) {
if (!dmat->HaveColAccess(true)) {
const std::vector<bool> enable(nCols, true);
dmat->InitColAccess(enable, 1, nRows);
dmat->InitColAccess(enable, 1, nRows, true);
}
dmlc::DataIter<ColBatch>* iter = dmat->ColIterator();
iter->BeforeFirst();