Skip to content

Support coherent memory for inplace predict.#12268

Draft
trivialfis wants to merge 3 commits into
dmlc:masterfrom
trivialfis:cuda-integrated
Draft

Support coherent memory for inplace predict.#12268
trivialfis wants to merge 3 commits into
dmlc:masterfrom
trivialfis:cuda-integrated

Conversation

@trivialfis

@trivialfis trivialfis commented Jun 26, 2026

Copy link
Copy Markdown
Member

Support running inplace predict with GPU directly on CPU inputs.

@trivialfis
trivialfis requested a review from Copilot June 26, 2026 14:12
@trivialfis
trivialfis marked this pull request as draft June 26, 2026 14:16

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 aims to enable “coherent memory” scenarios for inplace prediction, where the booster runs on CUDA while the input data remains on the host, by relaxing the device-mismatch handling and adding a CUDA runtime helper to detect coherent-memory capability.

Changes:

  • Add curt::IsCoherentMemory(device) CUDA runtime helper and expose it in cuda_rt_utils.h.
  • Update GBTree::InplacePredict to allow bypassing mismatched-device handling when host memory is coherent and the booster is on CUDA.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/gbm/gbtree.cc Adds coherent-memory check to relax device mismatch handling in InplacePredict.
src/common/cuda_rt_utils.h Declares new curt::IsCoherentMemory helper.
src/common/cuda_rt_utils.cc Implements curt::IsCoherentMemory using CUDA device properties.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gbm/gbtree.cc
Comment thread src/common/cuda_rt_utils.cc
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