diff --git a/paddle/fluid/framework/init.cc b/paddle/fluid/framework/init.cc index 457dc662b155a0010331130a518ecca8f236ed92..85beae775b96c3b7e08a2795bcd0ec79b24faeb4 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) {