未验证 提交 d2307e23 编写于 作者: W wopeizl 提交者: GitHub

Merge pull request #15846 from cjld/fix_cupti

Fix cupti
......@@ -112,12 +112,11 @@ double Event::CpuElapsedMs(const Event& e) const {
}
double Event::CudaElapsedMs(const Event& e) const {
#ifdef PADDLE_WITH_CUDA
#ifdef PADDLE_WITH_CUPTI
return gpu_ns_ / 1000000.0;
#endif
#else
PADDLE_THROW("CUDA is not enabled");
LOG_FIRST_N(WARNING, 1) << "CUDA CUPTI is not enabled";
return 0;
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册