Tensorflow AVX 支持
Tensorflow AVX Support
有谁知道 Tensorflow 编译的可执行文件 here include AVX support? I have been running that compiled version of Tensorflow on Google Compute Engine and it is slow. Dog slow. Cold molasses slow. LA traffic slow. This article 是否说使用 AVX 支持进行编译可以显着提高 Google Compute Engine 的性能,但是当我按照该站点上的编译过程进行操作时,它会失败。只是想知道 AVX 是否已经在可执行文件中?
否,tensorflow 默认发行版已构建 without CPU extensions, such as SSE4.1, SSE4.2, AVX, AVX2, FMA, etc, because these builds (e.g. ones from pip install tensorflow
) are intended to be compatible with as many CPUs as possible. Another argument is that even with these extensions CPU is a lot slower than a GPU, and it's expected for medium- and large-scale machine-learning training to be performed on a GPU. See also a 。
这篇文章是对的,AVX 和 FMA 指令显着(高达 300%!)加速了线性代数计算,即点积、矩阵乘法、卷积等。如果你想利用它,我会必须通过从源代码编译 tensorflow,这在 this question.
中讨论
这是最简单的方法。只需一步。
很简单,而且对速度影响很大。可以使训练速度提高 3 倍。
有谁知道 Tensorflow 编译的可执行文件 here include AVX support? I have been running that compiled version of Tensorflow on Google Compute Engine and it is slow. Dog slow. Cold molasses slow. LA traffic slow. This article 是否说使用 AVX 支持进行编译可以显着提高 Google Compute Engine 的性能,但是当我按照该站点上的编译过程进行操作时,它会失败。只是想知道 AVX 是否已经在可执行文件中?
否,tensorflow 默认发行版已构建 without CPU extensions, such as SSE4.1, SSE4.2, AVX, AVX2, FMA, etc, because these builds (e.g. ones from pip install tensorflow
) are intended to be compatible with as many CPUs as possible. Another argument is that even with these extensions CPU is a lot slower than a GPU, and it's expected for medium- and large-scale machine-learning training to be performed on a GPU. See also a
这篇文章是对的,AVX 和 FMA 指令显着(高达 300%!)加速了线性代数计算,即点积、矩阵乘法、卷积等。如果你想利用它,我会必须通过从源代码编译 tensorflow,这在 this question.
中讨论这是最简单的方法。只需一步。
很简单,而且对速度影响很大。可以使训练速度提高 3 倍。