diff --git a/paddle/fluid/platform/profiler.cc b/paddle/fluid/platform/profiler.cc index 42a93ad76c291006157bcf6ab0ec8cb3488f820b..28f93b4b1259e932ffdd2b5a124ccc4921ddd0f3 100644 --- a/paddle/fluid/platform/profiler.cc +++ b/paddle/fluid/platform/profiler.cc @@ -115,7 +115,8 @@ double Event::CudaElapsedMs(const Event& e) const { #ifdef PADDLE_WITH_CUPTI return gpu_ns_ / 1000000.0; #else - PADDLE_THROW("CUDA CUPTI is not enabled"); + LOG_FIRST_N(WARNING, 1) << "CUDA CUPTI is not enabled"; + return 0; #endif }