Fix memory usage of device sketching (#5407)

This commit is contained in:
Rory Mitchell
2020-03-14 13:43:24 +13:00
committed by GitHub
parent bb8c8df39d
commit b745b7acce
13 changed files with 153 additions and 73 deletions

View File

@@ -199,14 +199,15 @@ class DenseCuts : public CutsBuilder {
void Build(DMatrix* p_fmat, uint32_t max_num_bins) override;
};
// sketch_batch_num_elements 0 means autodetect. Only modify this for testing.
HistogramCuts DeviceSketch(int device, DMatrix* dmat, int max_bins,
size_t sketch_batch_num_elements = 10000000);
size_t sketch_batch_num_elements = 0);
// sketch_batch_num_elements 0 means autodetect. Only modify this for testing.
template <typename AdapterT>
HistogramCuts AdapterDeviceSketch(AdapterT* adapter, int num_bins,
float missing,
size_t sketch_batch_num_elements = 10000000);
size_t sketch_batch_num_elements = 0);
/*!
* \brief preprocessed global index matrix, in CSR format