未验证 提交 d45f5d78 编写于 作者: L Leo Chen 提交者: GitHub

Fix typo of selected_npus (#31230)

上级 387c1db4
...@@ -77,7 +77,7 @@ int GetCurrentNPUDeviceId() { ...@@ -77,7 +77,7 @@ int GetCurrentNPUDeviceId() {
std::vector<int> GetSelectedNPUDevices() { std::vector<int> GetSelectedNPUDevices() {
// use user specified NPUs in single-node multi-process mode. // use user specified NPUs in single-node multi-process mode.
std::vector<int> devices; std::vector<int> devices;
if (!FLAGS_selected_gpus.empty()) { if (!FLAGS_selected_npus.empty()) {
auto devices_str = paddle::string::Split(FLAGS_selected_npus, ','); auto devices_str = paddle::string::Split(FLAGS_selected_npus, ',');
for (auto id : devices_str) { for (auto id : devices_str) {
devices.push_back(atoi(id.c_str())); devices.push_back(atoi(id.c_str()));
......
...@@ -64,7 +64,7 @@ int main(int argc, char** argv) { ...@@ -64,7 +64,7 @@ int main(int argc, char** argv) {
undefok.push_back("initial_cpu_memory_in_mb"); undefok.push_back("initial_cpu_memory_in_mb");
#endif #endif
#if defined(PADDLE_WITH_CUDA) #if defined(PADDLE_WITH_ASCEND_CL)
envs.push_back("selected_npus"); envs.push_back("selected_npus");
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册