TensorFlow运行出现以下信息说明工作站支持这些指令集但编译的时候并没有加入
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
重新编译TensorFlow源代码支持SSE/AVX/FMA 指令集如下。
1.重新编译TensorFlow,从github上直接下载源码进行编译执行如下命令:
git clone https://github.com/tensorflow/tensorflow
2.编译源码需使用bazel,首先安装依赖库
sudo apt-get install python3-numpy python3-dev python3-pip python3-wheel libcupti-dev
添加bazel源