"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "08bdc86e77f0e92cee295dedeb5929b6eb2f3ef4"
Unverified Commit 58b49dd8 authored by shiyu1994's avatar shiyu1994 Committed by GitHub
Browse files

set num_threads of share_state (fix #3151) (#3238)


Co-authored-by: default avatarUbuntu <shiyu@gbdt-shiyu.ren3kv4wanvufliwrpy4k03lsf.xx.internal.cloudapp.net>
parent 1c35c3b9
......@@ -294,11 +294,11 @@ struct TrainingShareStates {
hist_buf;
void SetMultiValBin(MultiValBin* bin) {
num_threads = OMP_NUM_THREADS();
if (bin == nullptr) {
return;
}
multi_val_bin.reset(bin);
num_threads = OMP_NUM_THREADS();
num_bin_aligned =
(bin->num_bin() + kAlignedSize - 1) / kAlignedSize * kAlignedSize;
size_t new_size = static_cast<size_t>(num_bin_aligned) * 2 * num_threads;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment