-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support column-split in row partitioner #8828
Conversation
src/common/partition_builder.h
Outdated
auto const& cut_values = gmat.cut.Values(); | ||
auto const& cut_ptrs = gmat.cut.Ptrs(); | ||
|
||
auto gidx_calc = [&](auto ridx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider some refactoring to reuse this function with partition()
, maybe with GHistIndexMatrix::GetFValue
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -205,6 +244,14 @@ class CommonRowPartitioner { | |||
ctx, tree, this->Partitions(), p_out_position, | |||
[&](size_t idx) -> bool { return gpair[idx].GetHess() - .0f == .0f; }); | |||
} | |||
|
|||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should extract these into a different class or struct with its own utility member functions? Also, the CommonRowPartitioner
has private members, please place them together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
The approach is similar to what's done in
cpu_predictor.cc
: first collect decision/missing bits, then aggregate them across all the workers, and finally use them to do the partitioning.For now only support the
approx
method.