Here’s a whl file with Tensorflow 1.5rc0 with AVX and AVX2 support. So grab the file and say goodbye to
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 message.
Whl was built using Windows 10, Python 3.6, Cuda 9.0, Visual Studio 2015.
Link to tensorflow_gpu-1.5.0rc0-cp36-cp36m-win_amd64.whl
TL;DR – download tensorflow 1.5 with AVX support from the link on the bottom of this post
When running machine learning code on a new hardware using libraries available on PIP we are not using all capabilities provided by our cpu:
2018-01-10 09:35:05.048387: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
Last night I’ve rebuilt the tensorflow to support AVX CPU instructions. The set up for build takes about an hour. The build itself took 2 hours 20 minutes on my i7-8700k desktop with Windows 10 and hit the computer quite hard.
I’ve used official build manual (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/cmake/README.md), but it doesn’t mention all requirements:
* you need to install numpy in the environment you use for build
* you need to install wheel in the environment you use for build (otherwise it fails after 2 hours of build – sweet)
* if building against cuda9.1 you need to copy math_functions.h from cuda91/include/crt/ to cuda91/include directory (otherwise it fails after 1h of build)
Sample program without AVX:
start: 2018-01-10 09:35:04.609053
The same code with AVX:
start: 2018-01-10 09:36:18.167291
Here is the wheel file with support for AVX tensorflow_gpu-1.5.0rc0-cp36-cp36m-win_amd64.whl if you don’t want to run the build process itself.
And CPU usage during build (I got a new computer yesterday and I’m still excited by new toy :))