Compile tensflow-- illegal instruction (spit nuclear)

intel official website

https://software.intel.com/zh-cn/articles/intel-optimization-for-tensorflow-installation-guide

From the official website:

Not recommended to use the source code to build TensorFlow. However, if the command is not supported because ISA can not run, you can always use the source code to build.

Source code need to build TensorFlow Bazel, refer to the install information Bazel.
https://docs.bazel.build/versions/master/install.html#mac-os-x

https://docs.bazel.build/versions/master/install-redhat.html

Installation Notes:

Run TensorFlow source directory of "./configure
execute the following command to create pip package to install optimized TensorFlow build.
You can change the PATH, to point to a specific version of the compiler GCC:
Export the PATH = / bin the PATH //: $ the PATH
LD_LIBRARY_PATH also supports the new:
Export LD_LIBRARY_PATH = / the PATH // lib64: $ LD_LIBRARY_PATH
to mark the appropriate settings to use Intel ® math kernel library (Intel ® MLK) to build TensorFlow, and pass the appropriate command you want to use to compile libraries set:

bazel build --config=mkl -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mavx512f --copt=-mavx512pf --copt=-mavx512cd --copt=-mavx512er //tensorflow/tools/pip_package:build_pip_package

3. Install optimized TensorFlow wheel

bazel-bin/tensorflow/tools/pip_package/build_pip_package ~/path_to_save_wheel

pip install --upgrade --user ~/path_to_save_wheel /<wheel_name.whl>

other

https://www.cnblogs.com/harrymore/p/10028489.html
using python2.7 not tested

Above to be tested

Guess you like

Origin www.cnblogs.com/g2thend/p/12217902.html