Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebuilt binaries do not work with CPUs that do not have AVX instruction sets. #19584

Open
gunan opened this issue May 27, 2018 · 23 comments

Comments

@gunan
Copy link
Member

commented May 27, 2018

As announced in release notes, TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. This means on any CPU that do not have these instruction sets either CPU or GPU version of TF will fail to load with any of the following errors:

  • ImportError: DLL load failed:
  • A crash with return code 132

Our recommendation is to build TF from sources on these systems.

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu/windows/macos
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.6 and up
  • Python version: 2.7, 3.3, 3.4, 3.5, 3.6 and any newer
  • Bazel version (if compiling from source): n/a
  • GCC/Compiler version (if compiling from source): n/a
  • CUDA/cuDNN version: any
  • GPU model and memory: any
  • Exact command to reproduce: python -c "import tensorflow as tf"
@gunan

This comment has been minimized.

Copy link
Member Author

commented May 28, 2018

We encourage the community to build and share binaries for older CPU models.

@hadim

This comment has been minimized.

Copy link

commented Jun 1, 2018

Any chance for you to make the build for the community?

@hadim

This comment has been minimized.

Copy link

commented Jun 2, 2018

FYI, here is a Docker image that can build TensorFlow https://github.com/hadim/docker-tensorflow-builder. It can help to compile TF on a wide range of configurations as long as you have Docker installed on it.

@gunan

This comment has been minimized.

Copy link
Member Author

commented Jun 2, 2018

We encourage community supported wheels because for the officially blessed binaries we would like to run rigorous tests.
For just building, we encourage the community to build and share.

@bhack

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2018

@gunan Will this change with tensorflow/community#2?

@gunan

This comment has been minimized.

Copy link
Member Author

commented Jun 14, 2018

In the short term that involves this immediate design, no.
However this design is a part of a larger effort that will bring back support for older CPUs.
That will likely take longer to implement.

@kingofthebongo2008

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2018

CMake version on the other side on windows does not have AVX at all. I needed to enable it explictly locally.

@metral

This comment has been minimized.

Copy link

commented Sep 2, 2018

I've gone ahead and compiled GPU only builds for Tensorflow v1.10.1 against CUDA 9.1 + cuDNN 7.1, and CUDA 9.2 + cuDNN 7.2 and made the wheels and build info available here.

Huge thanks to all of the contributors and the supporting open source community.

Special thanks to @hadim for making his docker-tensorflow-builder available - it served as a great basis to generate these wheels. 🎉

@gunan

This comment has been minimized.

Copy link
Member Author

commented Nov 1, 2018

@mdsimmo

This comment has been minimized.

Copy link

commented Jan 12, 2019

I've built tf 1.13 for CPU without any fancy instructions here:

Python 2.7: yaroslavvb/tensorflow-community-wheels#97
Python 3.6: yaroslavvb/tensorflow-community-wheels#103

Hope it helps someone

@erdeq-upenn

This comment has been minimized.

Copy link

commented Feb 8, 2019

I have the same issue. Tried to build binary with bazel but failed. Try this "pip install tensorflow==1.5". It works for me.

@maxhgerlach

This comment has been minimized.

Copy link

commented Apr 10, 2019

Here's a TensorFlow 1.13.1 binary package for Westmere CPUs (no AVX) and Python 2.7: yaroslavvb/tensorflow-community-wheels#105

@jmsalomr

This comment has been minimized.

Copy link

commented Apr 21, 2019

Any compilation for Linux (no AVX) and Python 3.5 (Ubuntu 16.04)?

@Mark531

This comment has been minimized.

Copy link

commented Aug 28, 2019

Are there plans to release binaries without AVX instructions set for Windows?

@gunan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

Do you mean without AVX?
Our prebuilt binaries should already be built with AVX.

@Mark531

This comment has been minimized.

Copy link

commented Aug 28, 2019

Yes, many people complain about not being able to use latest versions of tensorflow because their CPUs don't support AVX. I created an issue on Anaconda github to ask them if they could provide the binaries that are suitable to the user's CPU.

@gunan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

We have no plans to build and release non-AVX binaries at the moment.

@Mark531

This comment has been minimized.

Copy link

commented Aug 28, 2019

Too bad, that's prejudicial for many users.

@liminai

This comment has been minimized.

Copy link

commented Sep 17, 2019

@Mark531 you can find unofficial built wheel from this link, hope it helps you

@Mark531

This comment has been minimized.

Copy link

commented Sep 17, 2019

@liminai awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.