谷歌云平台上的TensorFlow库没有编译使用SSE3、SSE4.1、SSE4.2、AVX。

2024-05-20 22:52:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个TensorFlow模型来测试一个宽n深的神经网络,但是由于TensorFlow库中的一个错误,我无法让它在我的windows机器上运行。现在我不得不求助于谷歌云平台。我在python文件处理输入的地方设置了所有内容,但是当我通过控制台运行代码时,会收到以下消息:

$ python -m widendeep.py -h
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
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.
W 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.
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.

在Windows上运行时不会显示这些消息。这是因为我不能用这种方式穿越云层吗?我是否必须使用gcloud ml engine local traingcloud ml engine jobs submit training my job?任何关于正确方法的指导都会很好。


Tags: thetocoreusetensorflowlibrarycpufeature
1条回答
网友
1楼 · 发布于 2024-05-20 22:52:06

These messages don't show when run on Windows. Is this because I can't run this through the cloud this way?

你可以按原样运行你的代码,或者至少如果你不能,它与你列出的警告无关。

这些警告表示,在运行TensorFlow的机器体系结构中,使用TensorFlow可能会获得更好的性能,因为它支持比编译时使用的更高级的指令集。

Do I have to use gcloud ml-engine local train or gcloud ml-engine jobs submit training my_job?

我不太熟悉Google cloud(目前我自己也在使用Amazon),但我可以说,如果你确实需要使用上面的命令,这与上面列出的警告无关。

这些警告适用于CPU指令集及其与GPU的交互方式,因此性能改进可能显著,也可能不显著(或根本不存在),具体取决于您的特定应用程序。

如果你想确定你正在使用你正在运行程序的硬件的全部潜能,你需要在你正在运行的平台上编译TensorFlow(检查How to compile Tensorflow with SSE4.2 and AVX instructions?)。

相关问题 更多 >