Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Tensorflow warn about AVX2 while I am using MKL?

I am using Tensorflow's Anaconda distribution with MKL support.

from tensorflow.python.framework import test_util
test_util.IsMklEnabled()

This code prints True. However, when I compile my Keras model I still get

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

This is not the behavior I was expecting.

like image 485
ozgur Avatar asked Dec 30 '18 17:12

ozgur


1 Answers

The MKL-DNN portions of the tensorflow execution (which is the main acceleration provided by MKL engineers) are JIT'ed at runtime. So the instruction set targeted at binary creation is not relevant to the MKL-DNN code. It will only effect the other math, mainly the Eigen library and whatever functions haven't been replaced with MKL-DNN functions.

like image 50
Nathan Greeneltch Avatar answered Sep 19 '22 00:09

Nathan Greeneltch