From ce55975bb51d4105f6cb15dd6daf11485a3ae635 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Mon, 19 Mar 2018 03:03:21 -0700 Subject: [PATCH] fix --- paddle/fluid/framework/init.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/framework/init.cc b/paddle/fluid/framework/init.cc index d077318b75..3c0d93642a 100644 --- a/paddle/fluid/framework/init.cc +++ b/paddle/fluid/framework/init.cc @@ -44,6 +44,7 @@ void InitGflags(std::vector &argv) { } void InitP2P(int count) { +#ifdef PADDLE_WITH_CUDA std::call_once(p2p_init_flag, [&]() { for (int i = 0; i < count; ++i) { for (int j = 0; j < count; ++j) { @@ -60,6 +61,7 @@ void InitP2P(int count) { } } }); +#endif } void InitDevices() { -- GitLab