Fix external memory for get column batches. (#4622)
* Fix external memory for get column batches. This fixes two bugs: * Use PushCSC for get column batches. * Don't remove the created temporary directory before finishing test. * Check all pages.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#include <dmlc/filesystem.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../../src/common/column_matrix.h"
|
||||
#include "../helpers.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
namespace xgboost {
|
||||
namespace common {
|
||||
@@ -51,10 +54,11 @@ TEST(DenseColumnWithMissing, Test) {
|
||||
delete dmat;
|
||||
}
|
||||
|
||||
void
|
||||
TestGHistIndexMatrixCreation(size_t nthreads) {
|
||||
void TestGHistIndexMatrixCreation(size_t nthreads) {
|
||||
dmlc::TemporaryDirectory tmpdir;
|
||||
std::string filename = tmpdir.path + "/big.libsvm";
|
||||
/* This should create multiple sparse pages */
|
||||
std::unique_ptr<DMatrix> dmat = CreateSparsePageDMatrix(1024, 1024);
|
||||
std::unique_ptr<DMatrix> dmat{ CreateSparsePageDMatrix(1024, 1024, filename) };
|
||||
omp_set_num_threads(nthreads);
|
||||
GHistIndexMatrix gmat;
|
||||
gmat.Init(dmat.get(), 256);
|
||||
|
||||
Reference in New Issue
Block a user