mgpu predictor using explicit offsets (#4438)

* mgpu prediction using explicit sharding
This commit is contained in:
Rong Ou
2019-05-10 14:35:06 -07:00
committed by Rory Mitchell
parent d16d9a9988
commit be0f346ec9
3 changed files with 77 additions and 18 deletions

View File

@@ -110,6 +110,9 @@ class GPUDistribution {
return GPUDistribution(devices, granularity, 0, std::vector<size_t>());
}
// NOTE(rongou): Explicit offsets don't necessarily cover the whole vector. Sections before the
// first shard or after the last shard may be on host only. This windowing is done in the GPU
// predictor for external memory support.
static GPUDistribution Explicit(GPUSet devices, std::vector<size_t> offsets) {
return GPUDistribution(devices, 1, 0, std::move(offsets));
}