Skip to content

Commit

Permalink
change how proxy is cast in cpu predictor
Browse files Browse the repository at this point in the history
  • Loading branch information
yoquinjo committed Mar 27, 2023
1 parent 5a08ff8 commit a173763
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/predictor/cpu_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,8 @@ class CPUPredictor : public Predictor {
bool InplacePredict(std::shared_ptr<DMatrix> p_m, const gbm::GBTreeModel &model, float missing,
PredictionCacheEntry *out_preds, uint32_t tree_begin,
unsigned tree_end) const override {
//auto proxy = dynamic_cast<data::DMatrixProxy *>(p_m.get());
auto proxy = new std::shared_ptr<xgboost::DMatrix>(new xgboost::data::DMatrixProxy);
if (!proxy) {
fprintf (stderr, "InplacePredict: proxy is null cpu variant");
exit(1);
}
auto proxy = dynamic_cast<data::DMatrixProxy *>(p_m.get());
//auto proxy = new std::shared_ptr<xgboost::DMatrix>(new xgboost::data::DMatrixProxy);
auto x = proxy->Adapter();
if (x.type() == typeid(std::shared_ptr<data::DenseAdapter>)) {
this->DispatchedInplacePredict<data::DenseAdapter, kBlockOfRowsSize>(
Expand Down

0 comments on commit a173763

Please sign in to comment.