首页 > 解决方案 > 您的 CPU 支持未编译此 TensorFlow 二进制文件以使用的指令:AVX2 FMA

问题描述

我用 Virtualenv 成功安装了 Tensorflow。但是,当我运行它时,我收到一个关于未使用 AVX2 FMA 的警告:

(tensorflow) MacBook-Pro-van-Niels:Tensorflow NielsRogge$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2018-07-20 12:00:37.904867: I 
tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports 
instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
>>> print(sess.run(hello))
Hello, TensorFlow!

我可能必须在我的虚拟环境中运行以下命令:

pip install --ignore-installed --upgrade "Download URL"

但是,我不确定我必须从这个网站使用的下载 URL 。正如您在上面的代码片段中看到的,我有 Python 2.7.10 和 GCC 4.2.1。我有一台具有以下规格的 Macbook Pro 。我的操作系统是 Mac OS High Sierra 10.13。我有 Python 版本 2.7.10,而在网站上需要 Python 2.7.15,这是一个问题吗?

标签: pythontensorflow

解决方案


它只是让您知道,如果优化编译,您的性能可以得到改善。为了使消息静音或添加额外的构建支持,您需要从源代码安装。请参阅此处,tensorflow.org/install/install_sources


推荐阅读