diff --git a/paddle/fluid/platform/profiler.cc b/paddle/fluid/platform/profiler.cc index 436654d1024a0bf72cb46d8a9d2650cf26f8f90e..9617d91b76c563074c1da78a07faa6ddbc47a2c9 100644 --- a/paddle/fluid/platform/profiler.cc +++ b/paddle/fluid/platform/profiler.cc @@ -112,12 +112,10 @@ 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"); + PADDLE_THROW("CUDA CUPTI is not enabled"); #endif }