未验证 提交 97e76cb9 编写于 作者: Z Zeng Jinle 提交者: GitHub

refine dev_ctx.Wait() exception throw, test=develop (#21600)

上级 1dcf6a72
......@@ -324,16 +324,10 @@ void CUDADeviceContext::Wait() const {
}
#endif
if (cudaSuccess != e_sync) {
LOG(FATAL) << "cudaStreamSynchronize " << cudaGetErrorString(e_sync)
<< " errno: " << e_sync;
}
cudaError_t e_get = cudaGetLastError();
if (cudaSuccess != e_get) {
LOG(FATAL) << "cudaGetLastError " << cudaGetErrorString(e_get)
<< " errno: " << e_get;
}
PADDLE_ENFORCE_CUDA_SUCCESS(
e_sync, platform::errors::Fatal(
"cudaStreamSynchronize raises error: %s, errono: %d",
cudaGetErrorString(e_sync), static_cast<int>(e_sync)));
}
int CUDADeviceContext::GetComputeCapability() const {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册