Implement GK sketching on GPU. (#5846)
* Implement GK sketching on GPU. * Strong tests on quantile building. * Handle sparse dataset by binary searching the column index. * Hypothesis test on dask.
This commit is contained in:
@@ -573,8 +573,8 @@ class Span {
|
||||
XGBOOST_DEVICE auto subspan() const -> // NOLINT
|
||||
Span<element_type,
|
||||
detail::ExtentValue<Extent, Offset, Count>::value> {
|
||||
SPAN_CHECK(Offset < size() || size() == 0);
|
||||
SPAN_CHECK(Count == dynamic_extent || (Offset + Count <= size()));
|
||||
SPAN_CHECK((Count == dynamic_extent) ?
|
||||
(Offset <= size()) : (Offset + Count <= size()));
|
||||
|
||||
return {data() + Offset, Count == dynamic_extent ? size() - Offset : Count};
|
||||
}
|
||||
@@ -582,9 +582,8 @@ class Span {
|
||||
XGBOOST_DEVICE Span<element_type, dynamic_extent> subspan( // NOLINT
|
||||
index_type _offset,
|
||||
index_type _count = dynamic_extent) const {
|
||||
SPAN_CHECK(_offset < size() || size() == 0);
|
||||
SPAN_CHECK((_count == dynamic_extent) || (_offset + _count <= size()));
|
||||
|
||||
SPAN_CHECK((_count == dynamic_extent) ?
|
||||
(_offset <= size()) : (_offset + _count <= size()));
|
||||
return {data() + _offset, _count ==
|
||||
dynamic_extent ? size() - _offset : _count};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user