未验证 提交 fb1a93a8 编写于 作者: R ronnywang 提交者: GitHub

fix custom_device log (#43890)

上级 bceca47a
...@@ -2217,12 +2217,12 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -2217,12 +2217,12 @@ All parameter, weight, gradient are variables in Paddle.
#ifdef PADDLE_WITH_CUSTOM_DEVICE #ifdef PADDLE_WITH_CUSTOM_DEVICE
device_types = phi::DeviceManager::GetAllDeviceTypes(); device_types = phi::DeviceManager::GetAllDeviceTypes();
#else #else
LOG(WARNING) << string::Sprintf( VLOG(1) << string::Sprintf(
"Cannot use get_all_device_type because you have installed" "Cannot use get_all_device_type because you have installed"
"CPU/GPU version PaddlePaddle.\n" "CPU/GPU version PaddlePaddle.\n"
"If you want to use get_all_device_type, please try to install" "If you want to use get_all_device_type, please try to install"
"CustomDevice version " "CustomDevice version "
"PaddlePaddle by: pip install paddlepaddle-core\n"); "PaddlePaddle by: pip install paddlepaddle\n");
#endif #endif
return device_types; return device_types;
}); });
...@@ -2231,12 +2231,12 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -2231,12 +2231,12 @@ All parameter, weight, gradient are variables in Paddle.
#ifdef PADDLE_WITH_CUSTOM_DEVICE #ifdef PADDLE_WITH_CUSTOM_DEVICE
device_types = phi::DeviceManager::GetAllCustomDeviceTypes(); device_types = phi::DeviceManager::GetAllCustomDeviceTypes();
#else #else
LOG(WARNING) << string::Sprintf( VLOG(1) << string::Sprintf(
"Cannot use get_all_custom_device_type because you have installed" "Cannot use get_all_custom_device_type because you have installed"
"CPU/GPU version PaddlePaddle.\n" "CPU/GPU version PaddlePaddle.\n"
"If you want to use get_all_custom_device_type, please try to " "If you want to use get_all_custom_device_type, please try to "
"install CustomDevice version " "install CustomDevice version "
"PaddlePaddle by: pip install paddlepaddle-core\n"); "PaddlePaddle by: pip install paddlepaddle\n");
#endif #endif
return device_types; return device_types;
}); });
...@@ -2245,12 +2245,12 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -2245,12 +2245,12 @@ All parameter, weight, gradient are variables in Paddle.
#ifdef PADDLE_WITH_CUSTOM_DEVICE #ifdef PADDLE_WITH_CUSTOM_DEVICE
devices = phi::DeviceManager::GetAllDeviceList(); devices = phi::DeviceManager::GetAllDeviceList();
#else #else
LOG(WARNING) << string::Sprintf( VLOG(1) << string::Sprintf(
"Cannot use get_available_device because you have installed" "Cannot use get_available_device because you have installed"
"CPU/GPU version PaddlePaddle.\n" "CPU/GPU version PaddlePaddle.\n"
"If you want to use get_available_device, please try to install" "If you want to use get_available_device, please try to install"
"CustomDevice version " "CustomDevice version "
"PaddlePaddle by: pip install paddlepaddle-core\n"); "PaddlePaddle by: pip install paddlepaddle\n");
#endif #endif
return devices; return devices;
}); });
...@@ -2259,14 +2259,14 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -2259,14 +2259,14 @@ All parameter, weight, gradient are variables in Paddle.
#ifdef PADDLE_WITH_CUSTOM_DEVICE #ifdef PADDLE_WITH_CUSTOM_DEVICE
devices = phi::DeviceManager::GetAllCustomDeviceList(); devices = phi::DeviceManager::GetAllCustomDeviceList();
#else #else
LOG(WARNING) << string::Sprintf( VLOG(1) << string::Sprintf(
"Cannot use get_available_custom_device because you have " "Cannot use get_available_custom_device because you have "
"installed" "installed"
"CPU/GPU version PaddlePaddle.\n" "CPU/GPU version PaddlePaddle.\n"
"If you want to use get_available_custom_device, please try to " "If you want to use get_available_custom_device, please try to "
"install" "install"
"CustomDevice version " "CustomDevice version "
"PaddlePaddle by: pip install paddlepaddle-core\n"); "PaddlePaddle by: pip install paddlepaddle\n");
#endif #endif
return devices; return devices;
}); });
...@@ -2340,7 +2340,7 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -2340,7 +2340,7 @@ All parameter, weight, gradient are variables in Paddle.
"version PaddlePaddle.\n" "version PaddlePaddle.\n"
"If you want to use CustomDevice, please try to install" "If you want to use CustomDevice, please try to install"
"CustomDevice version " "CustomDevice version "
"PaddlePaddle by: pip install paddlepaddle-core\n" "PaddlePaddle by: pip install paddlepaddle\n"
"If you only have CPU, please change " "If you only have CPU, please change "
"CustomPlace(%s, %d) to be CPUPlace().\n", "CustomPlace(%s, %d) to be CPUPlace().\n",
device_type, dev_id); device_type, dev_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册