提交 3014f6a1 编写于 作者: Q qijun

correct macro

上级 e02cc571
......@@ -30,7 +30,7 @@ Executor::Executor(const std::vector<platform::Place>& places) {
device_contexts_[i] = new platform::CPUDeviceContext(
boost::get<platform::CPUPlace>(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<platform::GPUPlace>(places[i]));
#else
......
......@@ -103,7 +103,7 @@ TEST_F(ExecutorTester, InitCPU) {
delete executor;
}
#ifndef PADDLE_ONLY_CPU
#ifdef PADDLE_WITH_GPU
TEST_F(ExecutorTester, InitGPU) {
std::vector<Place> places;
GPUPlace gpu_place0(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册