Clean up MGPU C++ tests (#9430)

This commit is contained in:
Rong Ou
2023-08-01 23:31:18 -07:00
committed by GitHub
parent a9da2e244a
commit c2b85ab68a
28 changed files with 200 additions and 194 deletions

View File

@@ -12,7 +12,7 @@
namespace xgboost {
inline void TestUpdaterJsonIO(std::string updater_str) {
Context ctx{MakeCUDACtx(GPUIDX)};
Context ctx{MakeCUDACtx(GetGPUId())};
Json config_0 {Object() };
{

View File

@@ -17,7 +17,7 @@ TEST(Linear, Shotgun) {
auto p_fmat = xgboost::RandomDataGenerator(kRows, kCols, 0).GenerateDMatrix();
auto ctx = MakeCUDACtx(GPUIDX);
auto ctx = MakeCUDACtx(GetGPUId());
LearnerModelParam mparam{MakeMP(kCols, .5, 1)};
{
@@ -49,7 +49,7 @@ TEST(Linear, coordinate) {
auto p_fmat = xgboost::RandomDataGenerator(kRows, kCols, 0).GenerateDMatrix();
auto ctx = MakeCUDACtx(GPUIDX);
auto ctx = MakeCUDACtx(GetGPUId());
LearnerModelParam mparam{MakeMP(kCols, .5, 1)};
auto updater = std::unique_ptr<xgboost::LinearUpdater>(