Align device id in predict transform with predictor. (#6662)

This commit is contained in:
Jiaming Yuan
2021-02-02 08:33:29 +08:00
committed by GitHub
parent d8ec7aad5a
commit a9ec0ea6da
6 changed files with 30 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ class HingeObj : public ObjFunction {
_preds[_idx] = _preds[_idx] > 0.0 ? 1.0 : 0.0;
},
common::Range{0, static_cast<int64_t>(io_preds->Size()), 1},
tparam_->gpu_id)
io_preds->DeviceIdx())
.Eval(io_preds);
}