Switch back to the GPUIDX macro (#9438)

This commit is contained in:
Rong Ou
2023-08-04 00:14:31 -07:00
committed by GitHub
parent 1aabc690ec
commit bde1ebc209
21 changed files with 85 additions and 88 deletions

View File

@@ -4,7 +4,7 @@
#include "../helpers.h"
namespace xgboost {
TEST(Metric, UnknownMetric) {
auto ctx = MakeCUDACtx(GetGPUId());
auto ctx = MakeCUDACtx(GPUIDX);
xgboost::Metric* metric = nullptr;
EXPECT_ANY_THROW(metric = xgboost::Metric::Create("unknown_name", &ctx));
EXPECT_NO_THROW(metric = xgboost::Metric::Create("rmse", &ctx));