Small cleanup to the proxy dmatrix.#11594
Merged
Merged
Conversation
20 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR cleans up the proxy DMatrix implementation by removing auto-dispatch for CUDA methods and standardizing method naming conventions. The changes focus on making the API more explicit about whether methods handle CPU or GPU data.
- Renamed several methods to use consistent naming patterns (e.g.,
SetArrayData→SetArray,SetCUDAArray→SetCudaArray) - Removed auto-dispatch logic that automatically determined whether to use CUDA columnar or array methods
- Added explicit CUDA method stubs when CUDA support is not available
- Updated copyright years and cleaned up includes
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/data/proxy_dmatrix.h | Updated method signatures and documentation, removed auto-dispatch logic |
| src/data/proxy_dmatrix.cc | Renamed host methods and added CUDA stubs for non-CUDA builds |
| src/data/proxy_dmatrix.cu | Renamed CUDA methods to match new naming convention |
| src/c_api/c_api.cc | Updated calls to use renamed proxy DMatrix methods |
| src/c_api/c_api.cu | Updated CUDA API calls to use renamed methods |
| tests/cpp/predictor/test_predictor.cc | Updated test calls to use renamed methods |
| tests/cpp/predictor/test_gpu_predictor.cu | Updated GPU test calls and copyright year |
| tests/cpp/predictor/test_cpu_predictor.cc | Updated CPU test calls and copyright year |
| tests/cpp/gbm/test_gbtree.cu | Updated test calls, copyright year, and cleaned imports |
| tests/cpp/gbm/test_gbtree.cc | Updated test calls and copyright year |
| tests/cpp/gbm/test_gblinear.cu | Updated copyright year only |
| tests/cpp/data/test_proxy_dmatrix.cu | Updated test calls, copyright year, and cleaned imports |
| tests/cpp/data/test_proxy_dmatrix.cc | Updated test calls, copyright year, and cleaned imports |
e920125 to
52a9eca
Compare
- Remove the auto-dispatch for CUDA methods. - Consistent naming. - Cleanup C API.
0f83026 to
c39a25a
Compare
Member
Author
|
cc @rongou . |
rongou
approved these changes
Jul 28, 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.
Ref #11088