diff --git a/paddle/math/Storage.cpp b/paddle/math/Storage.cpp index 2bd3db2341638b1f463f22c5a85a1632e0b9ac09..0403c3521cf54d833b32ff0810ba6d29dfc8f3c6 100644 --- a/paddle/math/Storage.cpp +++ b/paddle/math/Storage.cpp @@ -25,8 +25,8 @@ namespace paddle { // Initialization StorageEngine singleton. // Other modules may rely on storage management, // so StorageEngine need to be initialized before other modules. -// static InitFunction __init_storage_engine( -// StorageEngine::singleton, std::numeric_limits::max()); +static InitFunction __init_storage_engine([](){StorageEngine::singleton();}, + std::numeric_limits::max()); StorageEngine::StorageEngine() : cpuAllocator_(nullptr) { } diff --git a/paddle/pserver/LightNetwork.cpp b/paddle/pserver/LightNetwork.cpp index c42d2dbe4bbf56600640c1aa0817c463ece3ccda..5dc04ee6c2ef11e5316952626b36bbea49e9cb93 100644 --- a/paddle/pserver/LightNetwork.cpp +++ b/paddle/pserver/LightNetwork.cpp @@ -17,6 +17,7 @@ limitations under the License. */ #include #include #include +#include #include #include @@ -25,12 +26,6 @@ limitations under the License. */ #include #include -#if defined(__OSX__) || defined(__APPLE__) -#include -#else -#include -#endif - #include "LightNetwork.h" #include "paddle/utils/Util.h" #include "paddle/utils/StringUtil.h"