Skip to content

Commit

Permalink
fixing macos failure
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiach-msft committed May 25, 2020
1 parent 9659367 commit f3282ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/treelearner/data_parallel_tree_learner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ void DataParallelTreeLearner<TREELEARNER_T>::Init(const Dataset* train_data, boo
auto max_cat_threshold = this->config_->max_cat_threshold;
// need to be able to hold smaller and larger best splits in SyncUpGlobalBestSplit
size_t split_info_size = static_cast<size_t>(SplitInfo::Size(max_cat_threshold) * 2);
size_t histogram_size = static_cast<size_t>(this->train_data_->NumTotalBin() * kHistEntrySize);

// allocate buffer for communication
size_t buffer_size = std::max(this->train_data_->NumTotalBin() * kHistEntrySize, split_info_size);
size_t buffer_size = std::max(histogram_size, split_info_size);

input_buffer_.resize(buffer_size);
output_buffer_.resize(buffer_size);
Expand Down

0 comments on commit f3282ed

Please sign in to comment.