diff --git a/include/xgboost/base.h b/include/xgboost/base.h index 24ff4d397..3d346b43e 100644 --- a/include/xgboost/base.h +++ b/include/xgboost/base.h @@ -9,6 +9,7 @@ #include #include #include +#include /*! * \brief string flag for R library, to leave hooks when needed. diff --git a/tests/cpp/predictor/test_gpu_predictor.cu b/tests/cpp/predictor/test_gpu_predictor.cu index 3aa5f6f8a..1a4a48f83 100644 --- a/tests/cpp/predictor/test_gpu_predictor.cu +++ b/tests/cpp/predictor/test_gpu_predictor.cu @@ -15,6 +15,9 @@ TEST(gpu_predictor, Test) { std::unique_ptr cpu_predictor = std::unique_ptr(Predictor::Create("cpu_predictor")); + gpu_predictor->Init({}, {}); + cpu_predictor->Init({}, {}); + std::vector> trees; trees.push_back(std::unique_ptr(new RegTree())); trees.back()->InitModel(); diff --git a/tests/cpp/tree/test_gpu_hist.cu b/tests/cpp/tree/test_gpu_hist.cu index a6e34b0ce..c07e33732 100644 --- a/tests/cpp/tree/test_gpu_hist.cu +++ b/tests/cpp/tree/test_gpu_hist.cu @@ -22,9 +22,10 @@ TEST(gpu_hist_experimental, TestSparseShard) { hmat.Init(dmat.get(), max_bins); gmat.cut = &hmat; gmat.Init(dmat.get()); - ncclComm_t comm; + TrainParam p; + p.max_depth = 6; DeviceShard shard(0, 0, gmat, 0, rows, hmat.row_ptr.back(), - TrainParam()); + p); ASSERT_LT(shard.row_stride, columns); @@ -56,9 +57,10 @@ TEST(gpu_hist_experimental, TestDenseShard) { hmat.Init(dmat.get(), max_bins); gmat.cut = &hmat; gmat.Init(dmat.get()); - ncclComm_t comm; + TrainParam p; + p.max_depth = 6; DeviceShard shard(0, 0, gmat, 0, rows, hmat.row_ptr.back(), - TrainParam()); + p); ASSERT_EQ(shard.row_stride, columns);