相关疑难解决方法(0)

您的CPU支持未编译此TensorFlow二进制文件的指令:AVX AVX2

我是TensorFlow的新手.我最近安装了它(Windows CPU版本)并收到以下消息:

成功安装了tensorflow-1.4.0 tensorflow-tensorboard-0.4.0rc2

然后,当我试图跑

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
sess.run(hello)
'Hello, TensorFlow!'
a = tf.constant(10)
b = tf.constant(32)
sess.run(a + b)
42
sess.close()
Run Code Online (Sandbox Code Playgroud)

(我通过https://github.com/tensorflow/tensorflow找到)

我收到以下消息:

2017-11-02 01:56:21.698935:IC:\ tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137]你的CPU支持这个说明TensorFlow二进制文件未编译使用:AVX AVX2

但是当我跑的时候

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
Run Code Online (Sandbox Code Playgroud)

它运行应该和输出Hello, TensorFlow!,这表明安装确实成功,但还有其他错误.

你知道问题是什么以及如何解决它?谢谢.

cpu avx tensorflow

577
推荐指数
8
解决办法
42万
查看次数

如何使用SSE4.2和AVX指令编译Tensorflow?

这是从运行脚本以检查Tensorflow是否正常工作时收到的消息:

I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally
W tensorflow/core/platform/cpu_feature_guard.cc:95] 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:95] The TensorFlow library wasn't compiled to use AVX instructions, but these are available …
Run Code Online (Sandbox Code Playgroud)

x86 simd compiler-optimization compiler-options tensorflow

265
推荐指数
9
解决办法
23万
查看次数