From d45f5d787e10355bc6d6df12bb9982007bf1f681 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 25 Feb 2021 21:44:58 +0800 Subject: [PATCH] Fix typo of selected_npus (#31230) --- paddle/fluid/platform/npu_info.cc | 2 +- paddle/testing/paddle_gtest_main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/platform/npu_info.cc b/paddle/fluid/platform/npu_info.cc index 91099d2db2..6920436399 100644 --- a/paddle/fluid/platform/npu_info.cc +++ b/paddle/fluid/platform/npu_info.cc @@ -77,7 +77,7 @@ int GetCurrentNPUDeviceId() { std::vector GetSelectedNPUDevices() { // use user specified NPUs in single-node multi-process mode. std::vector devices; - if (!FLAGS_selected_gpus.empty()) { + if (!FLAGS_selected_npus.empty()) { auto devices_str = paddle::string::Split(FLAGS_selected_npus, ','); for (auto id : devices_str) { devices.push_back(atoi(id.c_str())); diff --git a/paddle/testing/paddle_gtest_main.cc b/paddle/testing/paddle_gtest_main.cc index f5154f0a0c..a886f7a029 100644 --- a/paddle/testing/paddle_gtest_main.cc +++ b/paddle/testing/paddle_gtest_main.cc @@ -64,7 +64,7 @@ int main(int argc, char** argv) { undefok.push_back("initial_cpu_memory_in_mb"); #endif -#if defined(PADDLE_WITH_CUDA) +#if defined(PADDLE_WITH_ASCEND_CL) envs.push_back("selected_npus"); #endif -- GitLab