2017-04-02 75 views
0

我試圖從源代碼安裝,因爲,當我與PIP和安裝virtualenv中未安裝CPU指令(SSE,AVX ...)警告Tensorflow:在哪裏添加CPU指令從源代碼安裝Tensorflow?

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. 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. 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,以便可以使用Tensorflow編譯這些指令。

  1. 除了Tensorflow網站上的說明以外,我還需要做什麼來編譯這些指令嗎? (./configure?)

  2. 如果是這樣,我需要做什麼以及如何做到這一點?

  3. 時,我必須安裝PIP包安裝,Tensorflow網站說,針對Linux的命令是: sudo pip install /tmp/tensorflow_pkg/tensorflow-1.0.1-py2-none-any.whl它說,該命令將根據機器上的不同,什麼是MacOS的等效命令?我該如何去Bazel wheel步驟?

側面說明:有人告訴我,有一些方法我可以巴澤勒做到這一點,但作爲雛與巴澤爾並沒有太多經驗豐富的終端,我需要做什麼明確的步驟是什麼?

OS塞拉利昂(10.12.2)

+0

從已刪除的答案:預先構建的優化二進制文件:https://github.com/lakshayg/tensorflow-build –

回答

0

在OSX你可以做

brew install tensor-flow 

我相信。

1

對於您的第一個問題(和兩個),./configure的默認值將爲您提供針對您的機器進行優化的指令集。這是通過默認編譯器選項-march=native完成的。只需按照以下步驟操作即可:here

對於第三種方法,一旦您在/tmp/tensorflow_pkg(或以前的地方)中生成了whl文件,然後查看該目錄中文件的名稱。它將與說明中給出的linux示例類似但不同。然後您應該可以使用pip install /tmp/tensorflow_pkg/YOUR_FILENAME.whl進行安裝。如果您有任何問題,你可以按照步驟here但使用/tmp/tensorflow_pkg/YOUR_FILENAME.whl代替tensorflowtensorflow-gpu

好運。

相關問題