PyPIからインストールした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.
訳すと「拡張命令に対応してるのに拡張命令サポートを有効にしてコンパイルされてないぜ。Why?」、意図するところは「tensorflowの実力はこんなものじゃないぜ。早くおまえのマシンとシンクロするんだ。」ということか。競合と速度比較されるので開発者も大変なのだろう。
ただの警告なので放置しても問題無いわけだが、使用するたびにログ出力されては気分がよろしくないのは確かではある。
それならばと、CPU最適化版へ取り替えようと思うわけだが、残念なことにPyPIではCPU最適化版の配布は行われていなかった。
この際であるから、手間はかかるとはいえ、いっそソースコードからビルドを試みてシンクロ率100%を目指すこととした。