Merge pull request #15846 from cjld/fix_cupti

Fix cupti
revert-15774-anakin_subgraph_engine
wopeizl 6 years ago committed by GitHub
commit d2307e2373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save