diff --git a/include/xgboost/tree_model.h b/include/xgboost/tree_model.h index 4fa2ccad8..0e0eefea6 100644 --- a/include/xgboost/tree_model.h +++ b/include/xgboost/tree_model.h @@ -328,7 +328,7 @@ class RegTree { nodes_[node.LeftChild()].SetParent(nid, true); nodes_[node.RightChild()].SetParent(nid, false); node.SetSplit(split_index, split_value, - default_left); + default_left); // mark right child as 0, to indicate fresh leaf nodes_[pleft].SetLeaf(left_leaf_weight, 0); nodes_[pright].SetLeaf(right_leaf_weight, 0); diff --git a/tests/cpp/predictor/test_gpu_predictor.cu b/tests/cpp/predictor/test_gpu_predictor.cu index 6302e05ba..b2cd23221 100644 --- a/tests/cpp/predictor/test_gpu_predictor.cu +++ b/tests/cpp/predictor/test_gpu_predictor.cu @@ -90,6 +90,7 @@ TEST(gpu_predictor, Test) { delete dmat; } +#if defined(XGBOOST_USE_NCCL) // Test whether pickling preserves predictor parameters TEST(gpu_predictor, MGPU_PicklingTest) { int ngpu; @@ -163,7 +164,9 @@ TEST(gpu_predictor, MGPU_PicklingTest) { CheckCAPICall(XGBoosterFree(bst2)); } +#endif // defined(XGBOOST_USE_NCCL) +#if defined(XGBOOST_USE_NCCL) // multi-GPU predictor test TEST(gpu_predictor, MGPU_Test) { std::unique_ptr gpu_predictor = @@ -202,6 +205,6 @@ TEST(gpu_predictor, MGPU_Test) { delete dmat; } } - +#endif // defined(XGBOOST_USE_NCCL) } // namespace predictor } // namespace xgboost \ No newline at end of file diff --git a/tests/cpp/tree/test_gpu_hist.cu b/tests/cpp/tree/test_gpu_hist.cu index 83896ebc8..c40ab7bb3 100644 --- a/tests/cpp/tree/test_gpu_hist.cu +++ b/tests/cpp/tree/test_gpu_hist.cu @@ -5,6 +5,9 @@ #include #include #include +#include +#include + #include "../helpers.h" #include "gtest/gtest.h" @@ -315,6 +318,8 @@ TEST(GpuHist, ApplySplit) { int constexpr n_cols = 8; TrainParam param; + std::vector> args = {}; + param.InitAllowUnknown(args); // Initialize shard for (size_t i = 0; i < n_cols; ++i) {