Remove omp_get_max_threads in CPU predictor. (#7519)

This is part of the on going effort to remove the dependency on global omp variables.
This commit is contained in:
Jiaming Yuan
2022-01-04 22:12:15 +08:00
committed by GitHub
parent 5516281881
commit 68cdbc9c16
6 changed files with 68 additions and 68 deletions

View File

@@ -217,10 +217,9 @@ void TestCategoricalPrediction(std::string name) {
gbm::GBTreeModel model(&param);
GBTreeModelForTest(&model, split_ind, split_cat, left_weight, right_weight);
GenericParameter runtime;
runtime.gpu_id = 0;
std::unique_ptr<Predictor> predictor{
Predictor::Create(name.c_str(), &runtime)};
GenericParameter ctx;
ctx.UpdateAllowUnknown(Args{{"gpu_id", "0"}});
std::unique_ptr<Predictor> predictor{Predictor::Create(name.c_str(), &ctx)};
std::vector<float> row(kCols);
row[split_ind] = split_cat;