|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|