-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Remove the deprecated gpu_hist
.
#11549
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
Conversation
gpu_hist
.gpu_hist
.
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 removes the deprecated gpu_hist
tree method across the codebase, replacing its usage with hist
or approx
, and cleans up related GPU configuration hooks.
- Replace all references to
gpu_hist
in tests, docs, and code with supported methods (hist
orapprox
). - Remove
UseGPU
overrides andConfigureGpuId
logic now thatgpu_hist
is gone. - Update Spark, Python, Scala, and C++ layers to drop unsupported
gpu_hist
handling.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/test_distributed/test_with_spark/test_spark_local.py | Replaced gpu_hist with hist /approx in Spark tests |
tests/python-gpu/test_gpu_pickling.py | Refactored pickling test into a helper, added type hint |
tests/cpp/gbm/test_gbtree.cc | Updated mapping table and expectations for approx |
src/learner.cc | Removed deprecated ConfigureGpuId calls |
src/gbm/gbtree.h | Dropped kGPUHist enum and registration |
src/gbm/gbtree.cc | Removed TreeMethod::kGPUHist updater and fallback |
src/gbm/gblinear.cc | Removed GPU support checks and UseGPU override |
src/context.cc | Deleted deprecated ConfigureGpuId method |
python-package/xgboost/spark/core.py | Simplified _run_on_gpu logic, dropped gpu_hist case |
python-package/xgboost/sklearn.py | Removed gpu_hist from _can_use_qdm |
jvm-packages/.../XGBoostEstimatorSuite.scala | Deleted tests for gpu_hist in Scala suite |
jvm-packages/.../TreeBoosterParams.scala | Removed gpu_hist from supported methods |
jvm-packages/.../XGBoostEstimator.scala | Simplified runOnGpu logic |
jvm-packages/.../GpuXGBoostPluginSuite.scala | Removed gpu_hist validation tests |
jvm-packages/.../GpuXGBoostPlugin.scala | Adjusted require check to only depend on device |
include/xgboost/gbm.h | Removed virtual UseGPU declaration |
include/xgboost/context.h | Deleted deprecated GPU configuration doc and method |
Comments suppressed due to low confidence (2)
python-package/xgboost/spark/core.py:504
- [nitpick] Update this docstring to clarify that GPU execution now depends solely on
device
or theuse_gpu
flag, sincetree_method
no longer triggers a GPU path.
"""If train or transform on the gpu according to the parameters"""
tests/test_distributed/test_with_spark/test_spark_local.py:930
- Add an assertion after validation to verify that
clf._run_on_gpu()
returns True whendevice='cuda'
andtree_method='approx'
, ensuring the new approximate GPU path is tested.
clf._validate_params()
No description provided.