Sketching from adapters (#5365)

* Sketching from adapters

* Add weights test
This commit is contained in:
Rory Mitchell
2020-03-07 21:07:58 +13:00
committed by GitHub
parent 0dd97c206b
commit a38e7bd19c
11 changed files with 780 additions and 624 deletions

View File

@@ -179,16 +179,14 @@ class DenseCuts : public CutsBuilder {
void Build(DMatrix* p_fmat, uint32_t max_num_bins) override;
};
// FIXME(trivialfis): Merge this into generic cut builder.
/*! \brief Builds the cut matrix on the GPU.
*
* \return The row stride across the entire dataset.
*/
size_t DeviceSketch(int device,
int max_bin,
int gpu_batch_nrows,
DMatrix* dmat,
HistogramCuts* hmat);
HistogramCuts DeviceSketch(int device, DMatrix* dmat, int max_bins,
size_t sketch_batch_num_elements = 10000000);
template <typename AdapterT>
HistogramCuts AdapterDeviceSketch(AdapterT* adapter, int num_bins,
float missing,
size_t sketch_batch_num_elements = 10000000);
/*!
* \brief preprocessed global index matrix, in CSR format