提交 f266284d 编写于 作者: D dangqingqing

Fix the compiling for only CPU mode.

上级 10622ba3
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册