Skip to content

Conversation

@trivialfis
Copy link
Member

@trivialfis trivialfis commented Jul 28, 2025

  • Remove the auto-dispatch for CUDA methods.

Ref #11088

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 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., SetArrayDataSetArray, SetCUDAArraySetCudaArray)
  • 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

- Remove the auto-dispatch for CUDA methods.
- Consistent naming.
- Cleanup C API.
@trivialfis
Copy link
Member Author

cc @rongou .

@trivialfis trivialfis merged commit ad2e715 into dmlc:master Jul 28, 2025
62 of 63 checks passed
@trivialfis trivialfis deleted the cleanup-proxy-dm branch July 28, 2025 19:06
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