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

My CPU doesn't support Tensorflow AVX instructions #34

Closed
bertagknowles opened this issue Feb 16, 2019 · 16 comments
Closed

My CPU doesn't support Tensorflow AVX instructions #34

bertagknowles opened this issue Feb 16, 2019 · 16 comments

Comments

@bertagknowles
Copy link

I was able to install all the requirements. However while generating samples, getting the following error. I have an Intel i3 First gen Processor and running Ubuntu 18.

2019-02-16 03:12:49.453982: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.
Aborted (core dumped)

I then installed Tensorflow 1.5 (pip3 install tensorflow==1.5). The sample was generated, however another warning popped up as shown below. Will this affect the quality? Do I need to compile TensorFlow on my system?

2019-02-16 03:22:19.785441: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2

@studiosi
Copy link

studiosi commented Feb 16, 2019

This piece of documentation by Microsoft may help you with AVX, at least if you are using Windows 7. On Linux it depends on whether your kernel supports the instructions or not (I believe, not sure), you may need to check that.

Regarding SSE4.1 and SSE4.2, if you compile the library yourself and you are using GCC, you may need to use some flags (depending on the version of the compiler) to enable the instructions. The contents of this issue can help you in this case. This instructions started to be introduced on the Core 2 Duo processors, so if yours is older than that (it is not), you may be out of luck.

@bertagknowles
Copy link
Author

Thx for the suggestions. Can I use a precompiled wheel from https://github.com/mind/wheels ?

@studiosi
Copy link

I suppose you can, I don't see any reason why you wouldn't.

@miweru
Copy link

miweru commented Feb 16, 2019

The mind wheels may not work, because they are a bit old. Maybe one of these is useful: https://github.com/yaroslavvb/tensorflow-community-wheels/issues

And its no problem if the warning pops up that your cpu supports instructions that are not in the build. It only means that tensorflow could run faster when using the wright wheel.

@twallace12
Copy link

I ran into the exact same problem with Ubuntu Server running on top of Hyper-V. I'm going to switch to running on Ubuntu Server on hardware to see if it makes a difference.

@twallace12
Copy link

Switched to Ubuntu Server running on bare hardware (Dell R710) and got this message: 2019-02-16 17:07:14.788642: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.

Anyone found a workaround?

@twallace12
Copy link

OK -- switched to an Ubuntu Server virtual machine on Hyper-V on Windows 10 running on an Intel i7 -- everything is working and producing fascinating text. :)

@4R7I5T
Copy link

4R7I5T commented Feb 18, 2019

I get this same error but it ends up working if I wait it out

@bhack
Copy link

bhack commented Feb 18, 2019

@bertagknowles
Copy link
Author

I get this same error but it ends up working if I wait it out

Yes, even on my virtual machine, the error is there but after some time the output is shown. Just want to know if resolving this warning will affect the quality of the output. I don't know how to compile the tensorflow binary and which flags to use.

@studiosi
Copy link

It should not affect the quality, but only the speed. Those instructions are optimizations to run faster floating point operations.

@twallace12
Copy link

Has anyone figured out how to prompt the system with sentences, as in the examples?

@kettenfett
Copy link

Has anyone figured out how to prompt the system with sentences, as in the examples?

This is off topic, but yeah. if you start the model in conditional mode, it will give you a prompt to enter your sentences.
python3 src/interactive_conditional_samples.py --top_k 40

@WuTheFWasThat
Copy link
Contributor

closing, feel free to reopen if there's an actual issue to resolve

@foobar167
Copy link

Try Anaconda. It has TensorFlow distribution for old CPU.

@nhogan5
Copy link

nhogan5 commented Jan 8, 2021

The CPU its self also needs to support the instructions sets. My Legacy Intel(R) Xeon(R) CPU E5520 in my r710 does not. Stumbled upon this: https://www.tensorflow.org/install/pip#hardware-requirements The link takes you to compatible CPUs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants