From f266284d9f0fe173cd4d2efc97a3461781050372 Mon Sep 17 00:00:00 2001 From: dangqingqing Date: Mon, 18 Dec 2017 16:53:52 +0800 Subject: [PATCH] Fix the compiling for only CPU mode. --- paddle/platform/profiler_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/platform/profiler_test.cc b/paddle/platform/profiler_test.cc index ed64ff40c9..5bd0a9d859 100644 --- a/paddle/platform/profiler_test.cc +++ b/paddle/platform/profiler_test.cc @@ -51,8 +51,6 @@ TEST(Event, CudaElapsedTime) { TEST(RecordEvent, RecordEvent) { using paddle::platform::DeviceContext; - using paddle::platform::CUDADeviceContext; - using paddle::platform::GPUPlace; using paddle::platform::Event; using paddle::platform::EventKind; using paddle::platform::RecordEvent; @@ -61,6 +59,8 @@ TEST(RecordEvent, RecordEvent) { ProfilerState state = ProfilerState::kCPU; DeviceContext* dev_ctx = nullptr; #ifdef PADDLE_WITH_CUDA + using paddle::platform::CUDADeviceContext; + using paddle::platform::GPUPlace; state = ProfilerState::kCUDA; dev_ctx = new paddle::platform::CUDADeviceContext(paddle::platform::GPUPlace(0)); -- GitLab