Skip to content
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

Merged
merged 10 commits into from
Feb 25, 2023

Conversation

rongou
Copy link
Contributor

@rongou rongou commented Feb 22, 2023

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.

@rongou
Copy link
Contributor Author

rongou commented Feb 22, 2023

@trivialfis @hcho3

auto const& cut_values = gmat.cut.Values();
auto const& cut_ptrs = gmat.cut.Ptrs();

auto gidx_calc = [&](auto ridx) {
Copy link
Member

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.

Copy link
Contributor Author

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:
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@trivialfis trivialfis merged commit d9688f9 into dmlc:master Feb 25, 2023
@rongou rongou deleted the colsplit-partitioner branch September 25, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants