title: How to compile TensorFlow binary to use AVX2, AVX512F, FMA?
body: <p>When I call <code>tf.Session()</code> in TensorFlow, I obtain the following warning message:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <ol>
  <li>How can I solve this? In particular, I wish to be able to keep the current TensorFlow version (1.12.0)</li>
  <li>Will I obtain a considerable gain considering that I work on GPU?</li>
  </ol>
  
  <p>I use Ubuntu 18.04.1 LTS.</p>
  
  <p>Thank you ;) </p>