diff --git a/paddle/fluid/platform/profiler.cc b/paddle/fluid/platform/profiler.cc index 9617d91b76c563074c1da78a07faa6ddbc47a2c9..42a93ad76c291006157bcf6ab0ec8cb3488f820b 100644 --- a/paddle/fluid/platform/profiler.cc +++ b/paddle/fluid/platform/profiler.cc @@ -114,7 +114,7 @@ double Event::CpuElapsedMs(const Event& e) const { double Event::CudaElapsedMs(const Event& e) const { #ifdef PADDLE_WITH_CUPTI return gpu_ns_ / 1000000.0; -#endif +#else PADDLE_THROW("CUDA CUPTI is not enabled"); #endif }