Fix race condition in CPU shap. (#7050)

This commit is contained in:
Jiaming Yuan
2021-06-21 10:03:15 +08:00
committed by GitHub
parent 29f8fd6fee
commit bbfffb444d
5 changed files with 68 additions and 64 deletions

View File

@@ -696,7 +696,7 @@ class GPUPredictor : public xgboost::Predictor {
void PredictContribution(DMatrix* p_fmat,
HostDeviceVector<bst_float>* out_contribs,
const gbm::GBTreeModel& model, unsigned tree_end,
std::vector<bst_float>*,
std::vector<bst_float> const*,
bool approximate, int,
unsigned) const override {
if (approximate) {
@@ -746,7 +746,7 @@ class GPUPredictor : public xgboost::Predictor {
HostDeviceVector<bst_float>* out_contribs,
const gbm::GBTreeModel& model,
unsigned tree_end,
std::vector<bst_float>*,
std::vector<bst_float> const*,
bool approximate) const override {
if (approximate) {
LOG(FATAL) << "[Internal error]: " << __func__