相关疑难解决方法(0)

使用所需的优化标志重新构建 Tensorflow

并提前感谢您的考虑,

我刚刚使用以下过程安装了 tensorflow(在一台已经安装了 Ubuntu 16.04 和 CUDA 8.0 的新机器上):

最初,我使用--copt=-march=native. 我收到了消息

W tensorflow/core/platform/cpu_feature_guard.cc:45] TensorFlow 库并未编译为使用 SSE3 指令,但这些指令可在您的机器上使用,并且可以加速 CPU 计算。

W tensorflow/core/platform/cpu_feature_guard.cc:45] TensorFlow 库未编译为使用 SSE4.1 指令,但这些指令可在您的机器上使用,并且可以加速 CPU 计算。

W tensorflow/core/platform/cpu_feature_guard.cc:45] TensorFlow 库未编译为使用 SSE4.2 指令,但这些指令可在您的机器上使用,并且可以加速 CPU 计算。

W tensorflow/core/platform/cpu_feature_guard.cc:45] TensorFlow 库没有被编译为使用 AVX 指令,但这些在您的机器上可用并且可以加速 CPU 计算。

W tensorflow/core/platform/cpu_feature_guard.cc:45] TensorFlow 库并未编译为使用 AVX2 指令,但这些指令可在您的机器上使用,并且可以加速 CPU 计算。

W tensorflow/core/platform/cpu_feature_guard.cc:45] TensorFlow 库没有被编译为使用 FMA 指令,但这些在您的机器上可用并且可以加速 CPU 计算。

因此,为了解决这个问题,我搜索了解决方案并使用了以下如何使用 SSE4.2 和 AVX 指令编译 Tensorflow的答案

通过使用 nVidia 的上述程序,从

bazel build -c opt --copt=-mavx …
Run Code Online (Sandbox Code Playgroud)

tensorflow

6
推荐指数
1
解决办法
8815
查看次数

Tensorflow AVX支持

有人知道这里的Tensorflow编译的可执行文件是否包括AVX支持?我已经在Google Compute Engine上运行Tensorflow的编译版本,并且运行缓慢。狗慢。冷糖蜜变慢。洛杉矶交通缓慢。本文说,使用AVX支持进行编译可以显着提高Google Compute Engine的性能,但是当我在该站点上执行编译过程时,它将失败。只是想知道AVX是否已在可执行文件中?

performance machine-learning avx google-compute-engine tensorflow

5
推荐指数
1
解决办法
2461
查看次数

TensorFlow库未编译为在Google Cloud Platform控制台上使用SSE3,SSE4.1,SSE4.2,AVX

我有一个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] …
Run Code Online (Sandbox Code Playgroud)

python google-cloud-console google-cloud-platform tensorflow

5
推荐指数
1
解决办法
9528
查看次数

从源构建Tensorflow时出现非法指令错误

我正在用bazel从源代码构建张量流,如下所述: https://www.tensorflow.org/install/install_sources

在安装文档之后,我使用以下代码成功编译:

bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both \
--cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"--config=cuda \
-k //tensorflow/tools/pip_package:build_pip_package
Run Code Online (Sandbox Code Playgroud)

这里接受的答案和安装文档中的注释"添加--cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"到gcc 5及更高版本的构建命令"的组合.

但是,会import tensorflow as tf导致错误

illegal instruction (core dumped), exiting python.
Run Code Online (Sandbox Code Playgroud)

我还试过:conda update libgcc无济于事.

如何使用gcc 5.0从源代码构建tensorflow?

python gcc tensorflow

4
推荐指数
1
解决办法
2001
查看次数

gcc选项同时使用i87,AVX但也不使用SSE

当编译为支持AVX扩展的处理器(比如-m64 -march=corei7-avx -mtune=corei7-avx适用)时,同时使用-mfpmath=both -mavx密钥是否有意义?没有这么多,它会导致编译器使用三套指令(i87,SSE,AVX在同一时间)?或者只是i87为了标量(在某种意义上)和AVX仅用于向量?

gcc sse instruction-set fpu avx

3
推荐指数
1
解决办法
796
查看次数