Implement weighted sketching for adapter. (#5760)
* Bounded memory tests. * Fixed memory estimation.
This commit is contained in:
@@ -52,6 +52,9 @@ class CudfAdapterBatch : public detail::NoMetaInfo {
|
||||
return {row_idx, column_idx, value};
|
||||
}
|
||||
|
||||
XGBOOST_DEVICE bst_row_t NumRows() const { return num_rows_; }
|
||||
XGBOOST_DEVICE bst_row_t NumCols() const { return columns_.size(); }
|
||||
|
||||
private:
|
||||
common::Span<ArrayInterface> columns_;
|
||||
size_t num_rows_;
|
||||
@@ -167,6 +170,9 @@ class CupyAdapterBatch : public detail::NoMetaInfo {
|
||||
return {row_idx, column_idx, value};
|
||||
}
|
||||
|
||||
XGBOOST_DEVICE bst_row_t NumRows() const { return array_interface_.num_rows; }
|
||||
XGBOOST_DEVICE bst_row_t NumCols() const { return array_interface_.num_cols; }
|
||||
|
||||
private:
|
||||
ArrayInterface array_interface_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user