Remove omp_get_max_threads in data. (#7588)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2019-2022 by XGBoost Contributors
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
#include <dmlc/filesystem.h>
|
||||
#include <fstream>
|
||||
@@ -66,7 +69,7 @@ TEST(SparsePage, PushCSCAfterTranspose) {
|
||||
SparsePage page; // Consolidated sparse page
|
||||
for (const auto &batch : dmat->GetBatches<xgboost::SparsePage>()) {
|
||||
// Transpose each batch and push
|
||||
SparsePage tmp = batch.GetTranspose(ncols);
|
||||
SparsePage tmp = batch.GetTranspose(ncols, common::OmpGetNumThreads(0));
|
||||
page.PushCSC(tmp);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Copyright 2021 XGBoost contributors
|
||||
* Copyright 2021-2022 XGBoost contributors
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
#include <xgboost/data.h>
|
||||
@@ -36,7 +36,7 @@ TEST(GradientIndex, FromCategoricalBasic) {
|
||||
BatchParam p(0, max_bins);
|
||||
GHistIndexMatrix gidx;
|
||||
|
||||
gidx.Init(m.get(), max_bins, false, {});
|
||||
gidx.Init(m.get(), max_bins, false, common::OmpGetNumThreads(0), {});
|
||||
|
||||
auto x_copy = x;
|
||||
std::sort(x_copy.begin(), x_copy.end());
|
||||
|
||||
Reference in New Issue
Block a user