Optimize prediction with QuantileDMatrix. (#9096)

- Reduce overhead in `FVecDrop`.
- Reduce overhead caused by `HostVector()` calls.
This commit is contained in:
Jiaming Yuan
2023-04-28 00:51:41 +08:00
committed by GitHub
parent fa267ad093
commit 0e470ef606
5 changed files with 49 additions and 35 deletions

View File

@@ -239,6 +239,9 @@ class GHistIndexMatrix {
bst_bin_t GetGindex(size_t ridx, size_t fidx) const;
float GetFvalue(size_t ridx, size_t fidx, bool is_cat) const;
float GetFvalue(std::vector<std::uint32_t> const& ptrs, std::vector<float> const& values,
std::vector<float> const& mins, bst_row_t ridx, bst_feature_t fidx,
bool is_cat) const;
private:
std::unique_ptr<common::ColumnMatrix> columns_;