Skip to content

Commit

Permalink
* Prevent MKL-DNN from compiling code with -march=native (pull #618)
Browse files Browse the repository at this point in the history
  • Loading branch information
okapies authored and saudet committed Sep 12, 2018
1 parent 1ee7a10 commit dee6581
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkl-dnn/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case $PLATFORM in
mkdir -p external
tar --totals -xf mklml_lnx_$MKLML_VERSION.tgz -C external
# libmklml_intel.so does not have a SONAME, so libmkldnn.so.0 needs an RPATH to be able to load
"$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DCMAKE_CXX_FLAGS='-Wl,-rpath,$ORIGIN/' -Wno-error=unused-result
"$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DCMAKE_CXX_FLAGS='-Wl,-rpath,$ORIGIN/' -DARCH_OPT_FLAGS='' -Wno-error=unused-result
make -j $MAKEJ
make install/strip
cp external/mklml_lnx_$MKLML_VERSION/include/* ../include/
Expand All @@ -39,7 +39,7 @@ case $PLATFORM in
export CC="$(ls -1 /usr/local/bin/gcc-? | head -n 1)"
export CXX="$(ls -1 /usr/local/bin/g++-? | head -n 1)"
sedinplace 's/__thread/thread_local/g' src/common/utils.hpp
"$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH
"$CMAKE" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DARCH_OPT_FLAGS=''
make -j $MAKEJ
make install/strip
cp external/mklml_mac_$MKLML_VERSION/include/* ../include/
Expand All @@ -50,7 +50,7 @@ case $PLATFORM in
download https://github.com/intel/mkl-dnn/releases/download/v$MKLDNN_VERSION/mklml_win_$MKLML_VERSION.zip mklml_win_$MKLML_VERSION.zip
mkdir -p external
unzip -o mklml_win_$MKLML_VERSION.zip -d external
"$CMAKE" -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH
"$CMAKE" -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DARCH_OPT_FLAGS=''
make -j $MAKEJ
make install/strip
cp external/mklml_win_$MKLML_VERSION/include/* ../include/
Expand Down

0 comments on commit dee6581

Please sign in to comment.