-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Replace the device model. #11752
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
Replace the device model. #11752
Conversation
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.
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.
cc @rongou |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.