Make HostDeviceVector single gpu only (#4773)

* Make HostDeviceVector single gpu only
This commit is contained in:
Rong Ou
2019-08-25 14:51:13 -07:00
committed by Rory Mitchell
parent 41227d1933
commit 38ab79f889
54 changed files with 641 additions and 1621 deletions

View File

@@ -12,7 +12,7 @@ TEST(GBTree, SelectTreeMethod) {
auto p_dmat {(*p_shared_ptr_dmat).get()};
GenericParameter generic_param;
generic_param.InitAllowUnknown(std::vector<Arg>{Arg("n_gpus", "0")});
generic_param.InitAllowUnknown(std::vector<Arg>{});
std::unique_ptr<GradientBooster> p_gbm{
GradientBooster::Create("gbtree", &generic_param, {}, 0)};
auto& gbtree = dynamic_cast<gbm::GBTree&> (*p_gbm);
@@ -35,7 +35,7 @@ TEST(GBTree, SelectTreeMethod) {
Arg{"num_feature", n_feat}}, p_dmat);
ASSERT_EQ(tparam.updater_seq, "grow_quantile_histmaker");
#ifdef XGBOOST_USE_CUDA
generic_param.InitAllowUnknown(std::vector<Arg>{Arg{"n_gpus", "1"}});
generic_param.InitAllowUnknown(std::vector<Arg>{Arg{"gpu_id", "0"}});
gbtree.ConfigureWithKnownData({Arg("tree_method", "gpu_hist"), Arg("num_feature", n_feat)},
p_dmat);
ASSERT_EQ(tparam.updater_seq, "grow_gpu_hist");