From 3014f6a1135e113cb55a6a2cb771d477502a8b00 Mon Sep 17 00:00:00 2001 From: qijun Date: Wed, 4 Oct 2017 17:36:19 -0700 Subject: [PATCH] correct macro --- paddle/framework/executor.cc | 2 +- paddle/framework/executor_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/framework/executor.cc b/paddle/framework/executor.cc index aa36b7438f..7c3cac359e 100644 --- a/paddle/framework/executor.cc +++ b/paddle/framework/executor.cc @@ -30,7 +30,7 @@ Executor::Executor(const std::vector& places) { device_contexts_[i] = new platform::CPUDeviceContext( boost::get(places[i])); } else if (platform::is_gpu_place(places[i])) { -#ifndef PADDLE_ONLY_CPU +#ifdef PADDLE_WITH_GPU device_contexts_[i] = new platform::CUDADeviceContext( boost::get(places[i])); #else diff --git a/paddle/framework/executor_test.cc b/paddle/framework/executor_test.cc index f746242a6b..ca7e8ca7d2 100644 --- a/paddle/framework/executor_test.cc +++ b/paddle/framework/executor_test.cc @@ -103,7 +103,7 @@ TEST_F(ExecutorTester, InitCPU) { delete executor; } -#ifndef PADDLE_ONLY_CPU +#ifdef PADDLE_WITH_GPU TEST_F(ExecutorTester, InitGPU) { std::vector places; GPUPlace gpu_place0(0); -- GitLab