Skip to content

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

Merged
merged 6 commits into from
Jul 10, 2025
Merged

Conversation

trivialfis
Copy link
Member

No description provided.

@trivialfis trivialfis marked this pull request as ready for review July 9, 2025 07:04
@trivialfis trivialfis changed the title [WIP] Remove the deprecated gpu_hist. Remove the deprecated gpu_hist. Jul 9, 2025
@trivialfis trivialfis requested a review from Copilot July 9, 2025 07:04
Copy link
Contributor

@Copilot 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 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 or approx).
  • Remove UseGPU overrides and ConfigureGpuId logic now that gpu_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 the use_gpu flag, since tree_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 when device='cuda' and tree_method='approx', ensuring the new approximate GPU path is tested.
        clf._validate_params()

@trivialfis trivialfis requested a review from hcho3 July 9, 2025 07:21
@trivialfis trivialfis merged commit 5ff47c1 into dmlc:master Jul 10, 2025
62 checks passed
@trivialfis trivialfis deleted the remove-gpu-updaters branch July 10, 2025 04:54
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