Move ellpack page construction into DMatrix (#4833)
This commit is contained in:
@@ -43,18 +43,17 @@ void TestDeviceSketch(bool use_external_memory) {
|
||||
dmat = static_cast<std::shared_ptr<xgboost::DMatrix> *>(dmat_handle);
|
||||
}
|
||||
|
||||
tree::TrainParam p;
|
||||
p.max_bin = 20;
|
||||
int gpu_batch_nrows = 0;
|
||||
int device{0};
|
||||
int max_bin{20};
|
||||
int gpu_batch_nrows{0};
|
||||
|
||||
// find quantiles on the CPU
|
||||
HistogramCuts hmat_cpu;
|
||||
hmat_cpu.Build((*dmat).get(), p.max_bin);
|
||||
hmat_cpu.Build((*dmat).get(), max_bin);
|
||||
|
||||
// find the cuts on the GPU
|
||||
HistogramCuts hmat_gpu;
|
||||
size_t row_stride = DeviceSketch(p, CreateEmptyGenericParam(0), gpu_batch_nrows,
|
||||
dmat->get(), &hmat_gpu);
|
||||
size_t row_stride = DeviceSketch(device, max_bin, gpu_batch_nrows, dmat->get(), &hmat_gpu);
|
||||
|
||||
// compare the row stride with the one obtained from the dmatrix
|
||||
size_t expected_row_stride = 0;
|
||||
|
||||
Reference in New Issue
Block a user