Intel® Optimization for TensorFlow* Wheel Now Available

Intel® Optimization for TensorFlow* Wheel Now Available

Intel® Optimization for TensorFlow* is now available for Linux* as a wheel installable through pip.

For more information on the optimizations as well as performance data, see this blog post.

To install the wheel into an existing Python* installation, simply run

# Python 2.7
pip install

# Python 3.5
pip install

# Python 3.6
pip install

To create a conda environment with Intel Tensorflow that also takes advantage of the Intel Distribution for Python’s optimized numpy, run

conda create -n tf -c intel python=<2|3> pip numpy
. activate tf
# Python 3.5
pip install
# Python 2.7
pip install


Thread Topic: 

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Thank you so much for this Chris!

Is there any plan to release optimized PyTorch as well?  I am switching from TensorFlow to PyTorch and I am aware of many other researchers who are switching as well.



No SSE4/AVX instructions.

Whatever installation method I choose, I keep getting the message "The TensorFlow library wasn't compiled to use SSE4.1/SSE4.2/AVX instructions".

Methods I tried:

$ conda create -n intel_tf -c intel --override-channels python=3 tensorflow
$ conda create -n intel_tf -c intel --override-channels python=2.7 tensorflow
$ conda create -n tf -c intel python=2 pip numpy && . activate tf && pip install

The code to test it simply was:

$ python -c 'import tensorflow as tf; tf.Session()'

All the previous commands have been tried with and without setting PYTHONNOUSERSITE=1.
Just to be explicit, none of the listed commands raised error, only the Session instantiation printed out the reported warnings.

My configuration:

$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Model name:            Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
Stepping:              4
CPU MHz:               1678.222
CPU max MHz:           3900,0000
CPU min MHz:           1200,0000
BogoMIPS:              6982.94
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0-11
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts

$ uname -a
Linux pc107 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
LSB Version:	core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial

$ conda info
Current conda install:

               platform : linux-64
          conda version : 4.3.25
       conda is private : False
      conda-env version : 4.3.25
    conda-build version : not installed
         python version :
       requests version : 2.13.0
       root environment : ~/miniconda2  (writable)
    default environment : ~/miniconda2
       envs directories : ~/miniconda2/envs
          package cache : ~/miniconda2/pkgs
           channel URLs :

            config file : ~/.condarc
             netrc file : ~/.netrc
           offline mode : False
             user-agent : conda/4.3.25 requests/2.13.0 CPython/2.7.13 Linux/4.4.0-92-generic debian/stretch/sid glibc/2.23    
                UID:GID : 1000:1000

$ cat ~/.condarc
  - intel
  - defaults


I get the same message. Is that normal?

The message is normal. Intel has implemented TF primitives with MKL-DNN, which takes advantage of the AVX2, AVX512, etc. The warning is coming from a part of the code that is not performance sensitive when MKL-DNN is used. It would make sense to disable the warning when KL-DNN is used, but that has not happened.

Are there plans to release an optimized version of TensorFlow for Windows? 

The latest TF I could find in CONDA in the intel channel is "1.1.0-np112py36_0" which is quite old...


What is the timeline for MacOS wheel?


It seems that this version does not use Xeon Phi Knight Corners cards plugging  to host. I try to run some tests. It only use CPU  and does not any Xeon Phi Cards. Are there any way to use  Xeon Phi Cards as Automatic Offload for MKL as in  Fortran/C/C++?



Leave a Comment

Please sign in to add a comment. Not a member? Join today