Skip to content

Commit c9730d3

Browse files
committed
fix run error on mac
test=develop
1 parent e0c8397 commit c9730d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

paddle/fluid/platform/init.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ void InitDevices(bool init_p2p, const std::vector<int> devices) {
116116
platform::SetNumThreads(FLAGS_paddle_num_threads);
117117
#endif
118118

119+
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OSX__)
119120
if (platform::jit::MayIUse(platform::jit::avx)) {
120121
#ifndef __AVX__
121122
LOG(WARNING) << "AVX is available, Please re-compile on local machine";
@@ -157,8 +158,9 @@ void InitDevices(bool init_p2p, const std::vector<int> devices) {
157158
AVX_GUIDE(AVX, NonAVX);
158159
}
159160
#endif
160-
161161
#undef AVX_GUIDE
162+
163+
#endif
162164
}
163165

164166
void InitGLOG(const std::string &prog_name) {

0 commit comments

Comments
 (0)