Replace the device model.#11752
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the previous GPU device model with tree-internal storage and updates predictors to support leaf and multi-target predictions, alongside cleanup in prediction kernels.
- Replace uses of GetNodes().size() with Size() across code/tests.
- Introduce device-side tree views stored as cuda::std::variant and refactor GPU predictor kernels to consume them.
- Add device qualifiers and APIs in tree view for categorical splits; rework SHAP path extraction to use tree views.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cpp/tree/test_tree_model.cc | Update test to use RegTree::Size() API. |
| src/tree/tree_view.h | Return categories matrix by const reference; add device qualifiers; minor doc update. |
| src/tree/hist/evaluate_splits.h | Use RegTree::Size() for snode_ sizing. |
| src/predictor/gpu_predictor.cu | Major refactor: remove per-kernel MakeScalarTreeView; use device-resident variant of tree views; unify prediction kernels; add SHAP path extraction based on tree views. |
| src/predictor/cpu_predictor.cc | Use RegTree::Size() for tree_sizes_. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
trivialfis
marked this pull request as ready for review
October 15, 2025 21:06
Member
Author
|
cc @rongou |
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rongou
approved these changes
Oct 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.