Unify the cat split storage for CPU. (#7937)

* Unify the cat split storage for CPU.

* Cleanup.

* Workaround.
This commit is contained in:
Jiaming Yuan
2022-05-26 19:14:40 +08:00
committed by GitHub
parent 755d9d4609
commit 18cbebaeb9
5 changed files with 25 additions and 33 deletions

View File

@@ -440,10 +440,10 @@ class RegTree : public Model {
* \param right_sum The sum hess of right leaf.
*/
void ExpandCategorical(bst_node_t nid, unsigned split_index,
common::Span<uint32_t> split_cat, bool default_left,
common::Span<const uint32_t> split_cat, bool default_left,
bst_float base_weight, bst_float left_leaf_weight,
bst_float right_leaf_weight, bst_float loss_change,
float sum_hess, float left_sum, float right_sum);
bst_float right_leaf_weight, bst_float loss_change, float sum_hess,
float left_sum, float right_sum);
bool HasCategoricalSplit() const {
return !split_categories_.empty();