Open hwschuur opened 1 year ago
@hwschuur hello, simply wrap this and the other occurrences in #ifndef __APPLE__
and #endif
respectively before and after the offending line, like so (example taken from tensor-convo.cc
):
#ifndef __APPLE__
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
#endif
Be careful, the line that contains feenableexcept
might be different in each file, so add the #ifndef __APPLE__
and #endif
combo by hand, don't copy/paste the whole block with 3 lines!
Files that need to be adapted:
first-convo.cc: feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
mnistposter.cc: feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
tensor-convo.cc: feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
tensor-relu.cc: feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
try-convo.cc: feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
Note that tensor-convo-par.cc also contains the line, but it is commented out and thefore can be left as is:
// feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
Output from building on macOS:
Found some articles that seem to provide a solution… unfortunately, I lack the skills to apply it :-)