[HOTFIX] distributed training with hist method (#4716)

* add parallel test for hist.EvalualiteSplit

* update test_openmp.py

* update test_openmp.py

* update test_openmp.py

* update test_openmp.py

* update test_openmp.py

* fix OMP schedule policy

* fix clang-tidy

* add logging: total_num_bins

* fix

* fix

* test

* replace guided OPENMP policy with static in updater_quantile_hist.cc
This commit is contained in:
Xu Xiao
2019-08-14 02:27:29 +08:00
committed by Philip Hyunsu Cho
parent c0ffe65f5c
commit ef9af33a00
4 changed files with 70 additions and 30 deletions

View File

@@ -556,7 +556,7 @@ void QuantileHistMaker::Builder::BuildHistsBatch(const std::vector<ExpandEntry>&
reinterpret_cast<const GradientPair::ValueT*>(gpair.data());
// 2. Build partial histograms for each node
#pragma omp parallel for schedule(guided)
#pragma omp parallel for schedule(static)
for (int32_t itask = 0; itask < n_hist_buidling_tasks; ++itask) {
const size_t tid = omp_get_thread_num();
const int32_t nid = task_nid[itask];
@@ -856,7 +856,7 @@ bool QuantileHistMaker::Builder::UpdatePredictionCache(
}
}
#pragma omp parallel for schedule(guided)
#pragma omp parallel for schedule(static)
for (omp_ulong k = 0; k < tasks_elem.size(); ++k) {
const RowSetCollection::Elem rowset = tasks_elem[k];
if (rowset.begin != nullptr && rowset.end != nullptr && rowset.node_id != -1) {
@@ -1079,7 +1079,7 @@ void QuantileHistMaker::Builder::EvaluateSplitsBatch(
// partial results
std::vector<std::pair<SplitEntry, SplitEntry>> splits(tasks.size());
// parallel enumeration
#pragma omp parallel for schedule(guided)
#pragma omp parallel for schedule(static)
for (omp_ulong i = 0; i < tasks.size(); ++i) {
// node_idx : offset within `nodes` list
const int32_t node_idx = tasks[i].first;