gpt4 book ai didi

Tensorflow 编译加速 CPU

转载 作者:行者123 更新时间:2023-12-03 22:17:34 26 4
gpt4 key购买 nike

当我在 python 2.7 中导入 tensorflow 后使用以下命令时:sess = tf.Session()
警告/错误:

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-02-02 00:41:48.616602: W 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-02-02 00:41:48.616614: W 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-02-02 00:41:48.616624: W 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.



请帮我解决这个问题,这样我就可以以最佳功率使用我的机器。

最佳答案

这些警告只是说如果你从源代码构建 TensorFlow,它可以在你的机器上运行得更快。没有修复,因为这不是问题,而是向用户提供此信息的预期行为。

这些 CPU 指令在默认情况下未启用,以提供与大多数机器的更广泛的兼容性。

正如文档所说:

TensorFlow checks on startup whether it has been compiled with the optimizations available on the CPU. If the optimizations are not included, TensorFlow will emit warnings, e.g. AVX, AVX2, and FMA instructions not included.



有关所有详细信息,请参阅 Performance Guide .

关于Tensorflow 编译加速 CPU,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41997719/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com