From ad3f6f4ad565eac65ff9781bbe739f4bba86853b Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Wed, 25 Apr 2018 09:40:23 +0800 Subject: [PATCH] Fix devices 'not undefined' error. --- paddle/fluid/framework/init.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/init.cc b/paddle/fluid/framework/init.cc index 457dc662b15..85beae775b9 100644 --- a/paddle/fluid/framework/init.cc +++ b/paddle/fluid/framework/init.cc @@ -69,9 +69,9 @@ void InitP2P(std::vector devices) { } void InitDevices(bool init_p2p) { -/*Init all available devices by default */ -#ifdef PADDLE_WITH_CUDA + /*Init all available devices by default */ std::vector devices; +#ifdef PADDLE_WITH_CUDA try { int count = platform::GetCUDADeviceCount(); for (int i = 0; i < count; ++i) { -- GitLab