Skip to content

Commit

Permalink
Remove test.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed May 8, 2023
1 parent bcf0edd commit 60b8a75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/cpp/gbm/test_gbtree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ TEST(GBTree, ChoosePredictor) {

auto p_dmat = RandomDataGenerator(kRows, kCols, 0).GenerateDMatrix();

auto& data = (*(p_dmat->GetBatches<SparsePage>().begin())).data;
auto const& data = (*(p_dmat->GetBatches<SparsePage>().begin())).data;
p_dmat->Info().labels.Reshape(kRows);

auto learner = std::unique_ptr<Learner>(Learner::Create({p_dmat}));
Expand All @@ -145,7 +145,7 @@ TEST(GBTree, ChoosePredictor) {
for (size_t i = 0; i < 4; ++i) {
learner->UpdateOneIter(i, p_dmat);
}
ASSERT_TRUE(data.HostCanWrite());
ASSERT_TRUE(data.HostCanRead());

// pull data into device.
data.HostVector();
Expand Down
10 changes: 0 additions & 10 deletions tests/cpp/test_learner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,6 @@ TEST(Learner, GPUConfiguration) {
learner->UpdateOneIter(0, p_dmat);
ASSERT_EQ(learner->Ctx()->gpu_id, 0);
}
{
// With CPU algorithm but GPU Predictor, this is to simulate when
// XGBoost is only used for prediction, so tree method is not
// specified.
std::unique_ptr<Learner> learner {Learner::Create(mat)};
learner->SetParams({Arg{"tree_method", "hist"},
Arg{"predictor", "gpu_predictor"}});
learner->UpdateOneIter(0, p_dmat);
ASSERT_EQ(learner->Ctx()->gpu_id, 0);
}
}
#endif // defined(XGBOOST_USE_CUDA)

Expand Down

0 comments on commit 60b8a75

Please sign in to comment.