From 35a90e06bf66d56684c8fc30bd74d7245443f85f Mon Sep 17 00:00:00 2001 From: Dun Liang Date: Thu, 21 Feb 2019 17:03:16 +0800 Subject: [PATCH] test=develop --- paddle/fluid/platform/profiler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/platform/profiler.cc b/paddle/fluid/platform/profiler.cc index 42a93ad76c..28f93b4b12 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 } -- GitLab