Skip to content

Remove the use of gpu_id in cpp tests.#11539

Merged
trivialfis merged 2 commits into
dmlc:masterfrom
trivialfis:remove-gpu-id-cpp-tests
Jul 1, 2025
Merged

Remove the use of gpu_id in cpp tests.#11539
trivialfis merged 2 commits into
dmlc:masterfrom
trivialfis:remove-gpu-id-cpp-tests

Conversation

@trivialfis

Copy link
Copy Markdown
Member

No description provided.

@trivialfis
trivialfis requested a review from Copilot June 28, 2025 06:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 use of the obsolete "gpu_id" parameter from cpp tests and replaces it with the new "device" parameter. Key changes include:

  • Updating test configurations to replace "gpu_id" with "device" and adjusting corresponding logic and JSON comparisons.
  • Revising GPU-related tests in serialization, learner, context, predictor, objective, and GBTree files to ensure consistency in GPU device handling.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/cpp/test_serialization.cc Replaced gpu_id checks with device parameter and updated JSON tests.
tests/cpp/test_learner.cc Modified learner parameter setups to use device instead of gpu_id.
tests/cpp/test_context.cu Updated context configuration and thread test cases to use device.
tests/cpp/predictor/test_predictor.cc Replaced gpu_hist/gpu_id settings with a consistent device configuration.
tests/cpp/objective/test_objective.cc Updated objective test configuration to use device parameter.
tests/cpp/gbm/test_gbtree.cc Modified GBTree tests to replace deprecated gpu_id usage.

@trivialfis
trivialfis requested a review from hcho3 June 30, 2025 18:39
@trivialfis
trivialfis merged commit d0fcd6b into dmlc:master Jul 1, 2025
60 of 61 checks passed
@trivialfis
trivialfis deleted the remove-gpu-id-cpp-tests branch July 1, 2025 09:14
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