Switch back to the GPUIDX macro (#9438)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace xgboost {
|
||||
TEST(Plugin, ExampleObjective) {
|
||||
xgboost::Context ctx = MakeCUDACtx(GetGPUId());
|
||||
xgboost::Context ctx = MakeCUDACtx(GPUIDX);
|
||||
auto* obj = xgboost::ObjFunction::Create("mylogistic", &ctx);
|
||||
ASSERT_EQ(obj->DefaultEvalMetric(), std::string{"logloss"});
|
||||
delete obj;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace {
|
||||
void VerifyAllReduceSum() {
|
||||
auto const world_size = collective::GetWorldSize();
|
||||
auto const rank = collective::GetRank();
|
||||
auto const device = GetGPUId();
|
||||
auto const device = GPUIDX;
|
||||
int count = 3;
|
||||
common::SetDevice(device);
|
||||
thrust::device_vector<double> buffer(count, 0);
|
||||
@@ -49,7 +49,7 @@ namespace {
|
||||
void VerifyAllGatherV() {
|
||||
auto const world_size = collective::GetWorldSize();
|
||||
auto const rank = collective::GetRank();
|
||||
auto const device = GetGPUId();
|
||||
auto const device = GPUIDX;
|
||||
int const count = rank + 2;
|
||||
common::SetDevice(device);
|
||||
thrust::device_vector<char> buffer(count, 0);
|
||||
|
||||
Reference in New Issue
Block a user