Skip to content

Conversation

@trivialfis
Copy link
Member

@trivialfis trivialfis commented Nov 19, 2025

  • Share the initialization code between sc tree and mt tree updaters.
  • Share the temporary buffer between partitioners.
  • Implement external memory support for reduced gradient.

ref #9043

@trivialfis trivialfis requested a review from Copilot November 19, 2025 11:48
Copilot finished reviewing on behalf of trivialfis November 19, 2025 11:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the GPU histogram tree builder code by introducing a RowPartitionerBatches wrapper struct to consolidate partitioner management logic and improves code clarity by renaming node_sum to child_sum in split candidate structures.

Key changes:

  • Introduces RowPartitionerBatches struct to encapsulate partitioner vector operations with a cleaner API
  • Renames node_sum to child_sum throughout multi-target split code for better semantic clarity
  • Removes dead code (unused sum_zeros calculation) and redundant checks

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tree/gpu_hist/row_partitioner.cuh Adds new RowPartitionerBatches struct with Init method and accessor functions to wrap partitioner vector management
src/tree/updater_gpu_hist.cuh Replaces std::vector<std::unique_ptr<RowPartitioner>> with RowPartitionerBatches type and updates method calls to use new API (At, Size, Empty)
src/tree/updater_gpu_hist.cu Similar updates as .cuh file, replacing vector operations with RowPartitionerBatches methods
src/tree/updater_gpu_common.cuh Renames node_sum member to child_sum in MultiSplitCandidate struct
src/tree/gpu_hist/multi_evaluate_splits.cu Updates references from node_sum to child_sum and removes unused sum_zeros calculation
src/tree/gpu_hist/expand_entry.cu Updates output stream operator to use child_sum instead of node_sum
tests/cpp/tree/gpu_hist/test_multi_evaluate_splits.cu Updates test assertions to check child_sum instead of node_sum
python-package/xgboost/testing/multi_target.py Adds min_cache_page_bytes parameter to test iterator configuration for better external memory testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@trivialfis trivialfis changed the title [mt] Cleanup partitioners. [wip][mt] Cleanup partitioners. Nov 19, 2025
@trivialfis trivialfis closed this Nov 19, 2025
@trivialfis trivialfis reopened this Nov 19, 2025
@trivialfis trivialfis requested a review from Copilot November 19, 2025 16:43
@trivialfis trivialfis changed the title [wip][mt] Cleanup partitioners. [mt] Cleanup partitioners. Nov 19, 2025
Copilot finished reviewing on behalf of trivialfis November 19, 2025 16:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@trivialfis
Copy link
Member Author

cc @rongou

@trivialfis trivialfis merged commit 41d6731 into dmlc:master Nov 19, 2025
63 checks passed
@trivialfis trivialfis deleted the mt-cleanup-partitioners branch November 19, 2025 21:21
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