python - TensorFlow 未编译为使用 SSE(等)指令,但这些指令可用

标签 python python-3.x tensorflow

我第一次使用一些示例代码运行 TensorFlow。运行我的代码时收到以下警告。有谁知道为什么会发生这种情况,以及如何解决?

2017-03-31 02:12:59.346109: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2017-03-31 02:12:59.346968: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2017-03-31 02:12:59.346975: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow libbrary wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2017-03-31 02:12:59.346979: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\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.
2017-03-31 02:12:59.346983: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-03-31 02:12:59.346987: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-03-31 02:12:59.346991: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-03-31 02:12:59.346995: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

最佳答案

这些是警告(如冒号后的 W 所示。错误有一个 E)。

警告是指您的 CPU 支持 SSE Instructions ,它允许一些快速的硬件并行操作。启用这些操作是一个编译时操作(即,要使用 SSE,您需要从源构建库以启用您所针对的特定 SSE 版本),在这种情况下,您可能会 take a look at this question .

但请注意,SSE 支持仅影响计算速度。 Tensorflow 可以在有或没有 SSE 的情况下工作,但您的代码可能需要更长的时间才能运行。 另请注意,这仅影响 CPU。如果您使用的是 GPU 构建的 Tensorflow,则在 GPU 上运行的所有操作都不会受益于 SSE 指令。

关于python - TensorFlow 未编译为使用 SSE(等)指令,但这些指令可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43134753/

相关文章:

python - 如何使用 itertools 替换设置字符替换限制?

python-3.x - 重命名列正则表达式,如果不匹配则保留名称

python - 卷积输出的 Tensorflow reshape 给出 TypeError

performance - 训练某些网络时,Keras(Tensorflow 后端)在 GPU 上比在 CPU 上慢

tensorflow - 无法卡住 Tensorflow 工作流程中的 Keras 层

python - 使用 Tornado 和 Python Eve 进行非阻塞调用

python - Django/apache 处理不完整/取消的 http 请求

python - SQLAlchemy 可以仅使用 MySQL 的 SSCursor 进行某些查询吗?

python - urllib.request : POST data should be bytes, 一个可迭代的字节,或者一个文件对象

python - 为什么我收到 MySQL 语法错误?