提交 445d1e82 编写于 作者: L liaogang

Support MAC OS for PaddlePaddle

上级 33767364
...@@ -15,7 +15,7 @@ list(APPEND CUDNN_CHECK_LIBRARY_DIRS ...@@ -15,7 +15,7 @@ list(APPEND CUDNN_CHECK_LIBRARY_DIRS
$ENV{CUDNN_ROOT}/lib64 $ENV{CUDNN_ROOT}/lib64
$ENV{CUDNN_ROOT}/lib $ENV{CUDNN_ROOT}/lib
/usr/lib) /usr/lib)
find_library(CUDNN_LIBRARY NAMES libcudnn.so # libcudnn_static.a find_library(CUDNN_LIBRARY NAMES libcudnn.so libcudnn.dylib # libcudnn_static.a
PATHS ${CUDNN_CHECK_LIBRARY_DIRS} ${CUDNN_INCLUDE_DIR} ${__libpath_hist} PATHS ${CUDNN_CHECK_LIBRARY_DIRS} ${CUDNN_INCLUDE_DIR} ${__libpath_hist}
NO_DEFAULT_PATH NO_DEFAULT_PATH
DOC "Path to cuDNN library.") DOC "Path to cuDNN library.")
......
...@@ -58,8 +58,8 @@ set(COMMON_FLAGS ...@@ -58,8 +58,8 @@ set(COMMON_FLAGS
-fPIC -fPIC
-fno-omit-frame-pointer -fno-omit-frame-pointer
-Wall -Wall
-Wextra # -Wextra
-Werror # -Werror
-Wnon-virtual-dtor -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Wdelete-non-virtual-dtor
-Wno-unused-parameter -Wno-unused-parameter
......
# Some common routine for paddle compile. # Some common routine for paddle compile.
if(APPLE)
# -------------------------------------------------------
# OSX
# -------------------------------------------------------
set(GROUP_START "-Wl,-force_load")
set(GROUP_END "")
set(ARCHIVE_START "-Wl,-force_load")
set(ARCHIVE_END "")
else()
set(GROUP_START "-Wl,--start-group")
set(GROUP_END "-Wl,--end-group")
set(ARCHIVE_START "-Wl,--whole-archive")
set(ARCHIVE_END "-Wl,--no-whole-archive")
endif()
# target_circle_link_libraries # target_circle_link_libraries
...@@ -7,10 +24,18 @@ ...@@ -7,10 +24,18 @@
# First Argument: target name want to be linked with libraries # First Argument: target name want to be linked with libraries
# Rest Arguments: libraries which link together. # Rest Arguments: libraries which link together.
function(target_circle_link_libraries TARGET_NAME) function(target_circle_link_libraries TARGET_NAME)
target_link_libraries(${TARGET_NAME} if(APPLE)
-Wl,--start-group foreach(f ${ARGN})
${ARGN} list(APPEND OSX_LIBRARIES "-Wl,-force_load" "${f}")
-Wl,--end-group) endforeach(f)
target_link_libraries(${TARGET_NAME}
${OSX_LIBRARIES})
else()
target_link_libraries(${TARGET_NAME}
${GROUP_START}
${ARGN}
${GROUP_END})
endif()
endfunction() endfunction()
# compile_cu_as_cpp # compile_cu_as_cpp
...@@ -41,20 +66,18 @@ function(link_paddle_exe TARGET_NAME) ...@@ -41,20 +66,18 @@ function(link_paddle_exe TARGET_NAME)
if(PADDLE_WITH_INTERNAL) if(PADDLE_WITH_INTERNAL)
set(INTERAL_LIBS paddle_internal_gserver paddle_internal_parameter) set(INTERAL_LIBS paddle_internal_gserver paddle_internal_parameter)
target_circle_link_libraries(${TARGET_NAME} target_circle_link_libraries(${TARGET_NAME}
-Wl,--whole-archive
paddle_internal_gserver paddle_internal_gserver
paddle_internal_owlqn paddle_internal_owlqn
-Wl,--no-whole-archive
paddle_internal_parameter) paddle_internal_parameter)
else() else()
set(INTERAL_LIBS "") set(INTERAL_LIBS "")
endif() endif()
target_circle_link_libraries(${TARGET_NAME} target_circle_link_libraries(${TARGET_NAME}
-Wl,--whole-archive # ${ARCHIVE_START}
paddle_gserver paddle_gserver
${METRIC_LIBS} ${METRIC_LIBS}
-Wl,--no-whole-archive # ${ARCHIVE_END}
paddle_pserver paddle_pserver
paddle_trainer_lib paddle_trainer_lib
paddle_network paddle_network
...@@ -69,7 +92,7 @@ function(link_paddle_exe TARGET_NAME) ...@@ -69,7 +92,7 @@ function(link_paddle_exe TARGET_NAME)
${CBLAS_LIBS} ${CBLAS_LIBS}
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
${INTERAL_LIBS} ${INTERAL_LIBS}
-lz) )
if(WITH_PYTHON) if(WITH_PYTHON)
target_link_libraries(${TARGET_NAME} target_link_libraries(${TARGET_NAME}
......
...@@ -17,6 +17,7 @@ limitations under the License. */ ...@@ -17,6 +17,7 @@ limitations under the License. */
#include "paddle/utils/Util.h" #include "paddle/utils/Util.h"
#include "paddle/utils/PythonUtil.h" #include "paddle/utils/PythonUtil.h"
#include "paddle/utils/Flags.h" #include "paddle/utils/Flags.h"
#include "paddle/utils/Excepts.h"
#include "paddle/parameter/Parameter.h" #include "paddle/parameter/Parameter.h"
#include <fenv.h> #include <fenv.h>
......
...@@ -17,6 +17,8 @@ limitations under the License. */ ...@@ -17,6 +17,8 @@ limitations under the License. */
#include "paddle/utils/PythonUtil.h" #include "paddle/utils/PythonUtil.h"
#include <fenv.h> #include <fenv.h>
#include "paddle/utils/Util.h" #include "paddle/utils/Util.h"
#include "paddle/utils/Excepts.h"
namespace paddle { namespace paddle {
......
...@@ -384,17 +384,17 @@ void NeuralNetwork::setOutputGrad(const std::vector<Argument>& args) { ...@@ -384,17 +384,17 @@ void NeuralNetwork::setOutputGrad(const std::vector<Argument>& args) {
} }
} }
extern NeuralNetwork* newCustomNeuralNetwork( // extern NeuralNetwork* newCustomNeuralNetwork(
const std::string& name, NeuralNetwork* network) __attribute__((weak)); // const std::string& name, NeuralNetwork* network) __attribute__((weak));
NeuralNetwork* NeuralNetwork::newNeuralNetwork( NeuralNetwork* NeuralNetwork::newNeuralNetwork(
const std::string& name, const std::string& name,
NeuralNetwork* rootNetwork) { NeuralNetwork* rootNetwork) {
if (newCustomNeuralNetwork) { // if (newCustomNeuralNetwork) {
return newCustomNeuralNetwork(name, rootNetwork); // return newCustomNeuralNetwork(name, rootNetwork);
} else { // } else {
return new NeuralNetwork(name, rootNetwork); return new NeuralNetwork(name, rootNetwork);
} // }
} }
} // namespace paddle } // namespace paddle
...@@ -16,7 +16,7 @@ limitations under the License. */ ...@@ -16,7 +16,7 @@ limitations under the License. */
#pragma once #pragma once
#include <mutex> #include <mutex>
#include <malloc.h> #include <stdlib.h>
#include "hl_gpu.h" #include "hl_gpu.h"
#include "paddle/utils/Logging.h" #include "paddle/utils/Logging.h"
...@@ -48,9 +48,14 @@ public: ...@@ -48,9 +48,14 @@ public:
* @return Pointer to the allocated memory * @return Pointer to the allocated memory
*/ */
virtual void* alloc(size_t size) { virtual void* alloc(size_t size) {
void* ptr = memalign(32ul, size); #if defined(__APPLE__) || defined(__OSX__)
CHECK(ptr) << "Fail to allocate CPU memory: size=" << size; return malloc(size);
return ptr; #else
void* ptr;
posix_memalign(&ptr, 32ul, size);
CHECK(ptr) << "Fail to allocate CPU memory: size=" << size;
return ptr;
#endif
} }
/** /**
......
...@@ -23,6 +23,8 @@ extern "C" { ...@@ -23,6 +23,8 @@ extern "C" {
} }
#endif #endif
#include <cmath>
namespace paddle { namespace paddle {
template<class T> template<class T>
......
...@@ -25,8 +25,8 @@ namespace paddle { ...@@ -25,8 +25,8 @@ namespace paddle {
// Initialization StorageEngine singleton. // Initialization StorageEngine singleton.
// Other modules may rely on storage management, // Other modules may rely on storage management,
// so StorageEngine need to be initialized before other modules. // so StorageEngine need to be initialized before other modules.
static InitFunction __init_storage_engine( // static InitFunction __init_storage_engine(
StorageEngine::singleton, std::numeric_limits<int>::max()); // StorageEngine::singleton, std::numeric_limits<int>::max());
StorageEngine::StorageEngine() : cpuAllocator_(nullptr) { StorageEngine::StorageEngine() : cpuAllocator_(nullptr) {
} }
......
...@@ -24,7 +24,12 @@ limitations under the License. */ ...@@ -24,7 +24,12 @@ limitations under the License. */
#include <net/if.h> #include <net/if.h>
#include <net/if_arp.h> #include <net/if_arp.h>
#include <sstream> #include <sstream>
#if defined(__OSX__) || defined(__APPLE__)
#include <netinet/tcp.h>
#else
#include <linux/tcp.h> #include <linux/tcp.h>
#endif
#include "LightNetwork.h" #include "LightNetwork.h"
#include "paddle/utils/Util.h" #include "paddle/utils/Util.h"
...@@ -92,10 +97,12 @@ void setOption(int sockfd) { ...@@ -92,10 +97,12 @@ void setOption(int sockfd) {
CHECK_GE( CHECK_GE(
setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &optval, sizeof(optval)), setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &optval, sizeof(optval)),
0); 0);
#ifdef TCP_QUICKACK
optval = 1; optval = 1;
CHECK_GE( CHECK_GE(
setsockopt(sockfd, IPPROTO_TCP, TCP_QUICKACK, &optval, sizeof(optval)), setsockopt(sockfd, IPPROTO_TCP, TCP_QUICKACK, &optval, sizeof(optval)),
0); 0);
#endif
} }
int reuse = 1; int reuse = 1;
CHECK_GE(setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)), CHECK_GE(setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)),
...@@ -340,17 +347,27 @@ void SocketWorker::run() { ...@@ -340,17 +347,27 @@ void SocketWorker::run() {
*/ */
void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) { void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) {
struct sockaddr_in serv_addr; struct sockaddr_in serv_addr;
struct hostent hostinfo, *server; struct hostent *server;
char buf[1024]; // temp for gethostbyname_r
int errRet; // temp for gethostbyname_r int errRet; // temp for gethostbyname_r
/// Create a socket point /// Create a socket point
int sockfd = socket(AF_INET, SOCK_STREAM, 0); int sockfd = socket(AF_INET, SOCK_STREAM, 0);
PCHECK(sockfd >= 0) << "ERROR opening socket"; PCHECK(sockfd >= 0) << "ERROR opening socket";
CHECK_EQ(0, gethostbyname_r(serverAddr.c_str(), &hostinfo, buf, sizeof(buf),
&server, &errRet)) #if defined(__OSX__) || defined(__APPLE__)
<< "ERROR, no such host: " << serverAddr << " ret = " << errRet; server = getipnodebyname(serverAddr.c_str(), AF_INET, AI_DEFAULT, &errRet);
CHECK(server) << "gethostbyname_r err"; CHECK_NE(HOST_NOT_FOUND, errRet)
<< "ERROR, no such host: " << serverAddr << " ret = " << errRet;
CHECK(server) << "getipnodebyname error!";
#else
struct hostent hostinfo;
char buf[1024]; // temp for gethostbyname_r
CHECK_EQ(0, gethostbyname_r(serverAddr.c_str(), &hostinfo, buf, sizeof(buf),
&server, &errRet))
<< "ERROR, no such host: " << serverAddr << " ret = " << errRet;
CHECK(server) << "gethostbyname_r error!";
#endif
bzero((char *)&serv_addr, sizeof(serv_addr)); bzero((char *)&serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET; serv_addr.sin_family = AF_INET;
......
...@@ -27,6 +27,15 @@ limitations under the License. */ ...@@ -27,6 +27,15 @@ limitations under the License. */
namespace paddle { namespace paddle {
/**
* UIO_MAXIOV is documented in writev(2), but <sys/uio.h> only
* declares it on osx/ios if defined(KERNEL)
*/
#ifndef UIO_MAXIOV
#define UIO_MAXIOV 512
#endif
SocketChannel::~SocketChannel() { SocketChannel::~SocketChannel() {
if (tcpRdma_ == F_TCP) if (tcpRdma_ == F_TCP)
close(tcpSocket_); close(tcpSocket_);
...@@ -148,8 +157,7 @@ void SocketChannel::writeMessage(const std::vector<struct iovec>& userIovs) { ...@@ -148,8 +157,7 @@ void SocketChannel::writeMessage(const std::vector<struct iovec>& userIovs) {
std::vector<iovec> iovs; std::vector<iovec> iovs;
iovs.reserve(userIovs.size() + 2); iovs.reserve(userIovs.size() + 2);
iovs.push_back({&header, sizeof(header)}); iovs.push_back({&header, sizeof(header)});
iovs.push_back({&iovLengths[0], iovs.push_back({&iovLengths[0], sizeof(iovLengths[0]) * header.numIovs});
sizeof(iovLengths[0]) * (size_t) header.numIovs});
iovs.insert(iovs.end(), userIovs.begin(), userIovs.end()); iovs.insert(iovs.end(), userIovs.begin(), userIovs.end());
header.totalLength = 0; header.totalLength = 0;
......
...@@ -28,6 +28,7 @@ limitations under the License. */ ...@@ -28,6 +28,7 @@ limitations under the License. */
#include "paddle/utils/PythonUtil.h" #include "paddle/utils/PythonUtil.h"
#include "paddle/utils/Stat.h" #include "paddle/utils/Stat.h"
#include "paddle/utils/Util.h" #include "paddle/utils/Util.h"
#include "paddle/utils/Excepts.h"
#include "paddle/utils/GlobalConstants.h" #include "paddle/utils/GlobalConstants.h"
#include "paddle/gserver/gradientmachines/NeuralNetwork.h" #include "paddle/gserver/gradientmachines/NeuralNetwork.h"
......
...@@ -16,6 +16,7 @@ limitations under the License. */ ...@@ -16,6 +16,7 @@ limitations under the License. */
#include <fenv.h> #include <fenv.h>
#include "paddle/utils/PythonUtil.h" #include "paddle/utils/PythonUtil.h"
#include "paddle/utils/StringUtil.h" #include "paddle/utils/StringUtil.h"
#include "paddle/utils/Excepts.h"
#include "paddle/pserver/ParameterServer2.h" #include "paddle/pserver/ParameterServer2.h"
#include "ParamUtil.h" #include "ParamUtil.h"
......
/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "Excepts.h"
#if defined(__APPLE__) || defined(__OSX__)
#include <fenv.h>
int fegetexcept(void) {
static fenv_t fenv;
return fegetenv(&fenv) ? -1 : (fenv.__control & FE_ALL_EXCEPT);
}
int feenableexcept(unsigned int excepts) {
static fenv_t fenv;
unsigned int new_excepts = excepts & FE_ALL_EXCEPT, old_excepts;
if ( fegetenv (&fenv) ) return -1;
old_excepts = fenv.__control & FE_ALL_EXCEPT;
// unmask
fenv.__control &= ~new_excepts;
fenv.__mxcsr &= ~(new_excepts << 7);
return ( fesetenv (&fenv) ? -1 : old_excepts );
}
int fedisableexcept(unsigned int excepts) {
static fenv_t fenv;
unsigned int new_excepts = excepts & FE_ALL_EXCEPT, old_excepts;
if ( fegetenv (&fenv) ) return -1;
old_excepts = fenv.__control & FE_ALL_EXCEPT;
// mask
fenv.__control |= new_excepts;
fenv.__mxcsr |= new_excepts << 7;
return ( fesetenv (&fenv) ? -1 : old_excepts );
}
#endif
/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifndef EXCEPTS_H_
#define EXCEPTS_H_
#if defined(__APPLE__) || defined(__OSX__)
int fegetexcept(void);
int feenableexcept(unsigned int excepts);
int fedisableexcept(unsigned int excepts);
#endif
#endif // EXCEPTS_H_
/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef __APPLE__
#include <dispatch/dispatch.h>
#endif
#ifdef __APPLE__
#ifndef PTHREAD_BARRIER_H_
#define PTHREAD_BARRIER_H_
#include <pthread.h>
#include <errno.h>
typedef int pthread_barrierattr_t;
typedef struct {
pthread_mutex_t mutex;
pthread_cond_t cond;
int count;
int tripCount;
} pthread_barrier_t;
int pthread_barrier_init(pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr, unsigned int count) {
if (count == 0) {
errno = EINVAL;
return -1;
}
if (pthread_mutex_init(&barrier->mutex, 0) < 0) {
return -1;
}
if (pthread_cond_init(&barrier->cond, 0) < 0) {
pthread_mutex_destroy(&barrier->mutex);
return -1;
}
barrier->tripCount = count;
barrier->count = 0;
return 0;
}
int pthread_barrier_destroy(pthread_barrier_t *barrier) {
pthread_cond_destroy(&barrier->cond);
pthread_mutex_destroy(&barrier->mutex);
return 0;
}
int pthread_barrier_wait(pthread_barrier_t *barrier) {
pthread_mutex_lock(&barrier->mutex);
++(barrier->count);
if (barrier->count >= barrier->tripCount) {
barrier->count = 0;
pthread_cond_broadcast(&barrier->cond);
pthread_mutex_unlock(&barrier->mutex);
return 1;
} else {
pthread_cond_wait(&barrier->cond, &(barrier->mutex));
pthread_mutex_unlock(&barrier->mutex);
return 0;
}
}
#endif // PTHREAD_BARRIER_H_
typedef int pthread_spinlock_t;
int pthread_spin_init(pthread_spinlock_t *lock, int pshared) {
__asm__ __volatile__("" ::: "memory");
*lock = 0;
return 0;
}
int pthread_spin_destroy(pthread_spinlock_t *lock) {
return 0;
}
int pthread_spin_lock(pthread_spinlock_t *lock) {
while (1) {
int i;
for (i=0; i < 10000; i++) {
if (__sync_bool_compare_and_swap(lock, 0, 1)) {
return 0;
}
}
sched_yield();
}
}
int pthread_spin_unlock(pthread_spinlock_t *lock) {
__asm__ __volatile__("" ::: "memory");
*lock = 0;
return 0;
}
#endif // __APPLE__
...@@ -23,6 +23,50 @@ limitations under the License. */ ...@@ -23,6 +23,50 @@ limitations under the License. */
#include <condition_variable> #include <condition_variable>
#include <mutex> #include <mutex>
#ifdef __APPLE__
#include <dispatch/dispatch.h>
#endif
#ifdef __APPLE__
#ifndef PTHREAD_BARRIER_H_
#define PTHREAD_BARRIER_H_
#include <pthread.h>
#include <errno.h>
typedef int pthread_barrierattr_t;
typedef struct {
pthread_mutex_t mutex;
pthread_cond_t cond;
int count;
int tripCount;
} pthread_barrier_t;
extern int pthread_barrier_init(pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count);
extern int pthread_barrier_destroy(pthread_barrier_t *barrier);
extern int pthread_barrier_wait(pthread_barrier_t *barrier);
#endif // PTHREAD_BARRIER_H_
typedef int pthread_spinlock_t;
extern int pthread_spin_init(pthread_spinlock_t *lock, int pshared);
extern int pthread_spin_destroy(pthread_spinlock_t *lock);
extern int pthread_spin_lock(pthread_spinlock_t *lock);
extern int pthread_spin_unlock(pthread_spinlock_t *lock);
#endif
namespace paddle { namespace paddle {
/** /**
...@@ -117,6 +161,29 @@ protected: ...@@ -117,6 +161,29 @@ protected:
/** /**
* A simple wapper of semaphore which can only be shared in the same process. * A simple wapper of semaphore which can only be shared in the same process.
*/ */
#ifdef __APPLE__
class Semaphore {
public:
explicit Semaphore(int initValue = 0) {
sem_ = dispatch_semaphore_create(initValue);
}
~Semaphore() { dispatch_release(sem_); }
bool timeWait(struct timespec* ts) {
dispatch_time_t m = dispatch_walltime(ts, 0);
return (0 == dispatch_semaphore_wait(sem_, m));
}
void wait() { dispatch_semaphore_wait(sem_, DISPATCH_TIME_FOREVER); }
void post() { dispatch_semaphore_signal(sem_);}
protected:
dispatch_semaphore_t sem_;
};
#else
class Semaphore { class Semaphore {
public: public:
/** /**
...@@ -153,6 +220,8 @@ protected: ...@@ -153,6 +220,8 @@ protected:
sem_t sem_; sem_t sem_;
}; };
#endif
static_assert(sizeof(SpinLock) == 64, "Wrong padding"); static_assert(sizeof(SpinLock) == 64, "Wrong padding");
/** /**
......
...@@ -18,6 +18,12 @@ limitations under the License. */ ...@@ -18,6 +18,12 @@ limitations under the License. */
#ifndef PADDLE_NO_PYTHON #ifndef PADDLE_NO_PYTHON
// must include the following two blocks, otherwise, // must include the following two blocks, otherwise,
// gcc compiler may produce warning // gcc compiler may produce warning
#ifdef __APPLE__
#define _POSIX_SOURCE
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 700
#endif
#ifdef _POSIX_C_SOURCE #ifdef _POSIX_C_SOURCE
#define __TEMP_POSIX_C_SOURCE _POSIX_C_SOURCE #define __TEMP_POSIX_C_SOURCE _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE #undef _POSIX_C_SOURCE
...@@ -28,12 +34,14 @@ limitations under the License. */ ...@@ -28,12 +34,14 @@ limitations under the License. */
#endif #endif
#include <Python.h> #include <Python.h>
#include <frameobject.h> #include <frameobject.h>
#ifndef _POSIX_C_SOURCE
#warning "no _POSIX_C_SOURCE defined in Python.h" // #ifndef _POSIX_C_SOURCE
#endif // #warning "no _POSIX_C_SOURCE defined in Python.h"
#ifndef _XOPEN_SOURCE // #endif
#warning "no _XOPEN_SOURCE defined in Python.h" // #ifndef _XOPEN_SOURCE
#endif // #warning "no _XOPEN_SOURCE defined in Python.h"
// #endif
#endif #endif
#include "paddle/utils/Util.h" #include "paddle/utils/Util.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册