Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile TensorFlow binary to use AVX2, AVX512F, FMA?

When I call tf.Session() in TensorFlow, I obtain the following warning message:

I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA

My questions are:

  1. How can I solve this? In particular, I wish to be able to keep the current TensorFlow version (1.12.0)
  2. Will I obtain a considerable gain considering that I work on GPU?

I use Ubuntu 18.04.1 LTS.

Thank you ;)

like image 379
Gabriele Avatar asked Jan 21 '26 05:01

Gabriele


1 Answers

  1. I do not know how to keep 1.12.0, however the Tensorflow page has a good build guide: https://www.tensorflow.org/install/source#setup_for_linux_and_macos

  2. According to comments from this thread at the Tensorflow github project, no. Quote:

From my experiments I found CPU-optimized GPU TF doesn't boost the performance significantly, but it can make the CPU cooler.

like image 165
Tyreal Avatar answered Jan 23 '26 17:01

Tyreal