Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugin/sycl/data/gradient_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ void GHistIndexMatrix::SetIndexData(::sycl::queue* qu,
BinIdxType* sort_data = reinterpret_cast<BinIdxType*>(sort_buff.Data());

for (auto &batch : dmat->GetBatches<SparsePage>()) {
batch.data.SetDevice(ctx->Device());
batch.offset.SetDevice(ctx->Device());
const xgboost::Entry *data_ptr = batch.data.ConstDevicePointer();
const bst_idx_t *offset_vec = batch.offset.ConstDevicePointer();
size_t batch_size = batch.Size();
Expand Down
4 changes: 3 additions & 1 deletion plugin/sycl/predictor/predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ class Predictor : public xgboost::Predictor {
xgboost::Predictor::Predictor{context},
cpu_predictor(xgboost::Predictor::Create("cpu_predictor", context)),
qu_(device_manager.GetQueue(context->Device())),
device_prop_(qu_->get_device()) {}
device_prop_(qu_->get_device()) {
device_model.SetDevice(context->Device());
}

void PredictBatch(DMatrix *dmat, PredictionCacheEntry *predts,
const gbm::GBTreeModel &model, bst_tree_t tree_begin,
Expand Down
Loading