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 · 15 comments
Closed

My CPU doesn't support Tensorflow AVX instructions #34

bertagknowles opened this issue Feb 16, 2019 · 15 comments

Comments

@bertagknowles
Copy link

@bertagknowles bertagknowles commented Feb 16, 2019

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

This comment has been minimized.

Copy link

@studiosi 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

This comment has been minimized.

Copy link
Author

@bertagknowles bertagknowles commented Feb 16, 2019

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

@studiosi

This comment has been minimized.

Copy link

@studiosi studiosi commented Feb 16, 2019

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

@miweru

This comment has been minimized.

Copy link

@miweru 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

This comment has been minimized.

Copy link

@twallace12 twallace12 commented Feb 16, 2019

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

This comment has been minimized.

Copy link

@twallace12 twallace12 commented Feb 16, 2019

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

This comment has been minimized.

Copy link

@twallace12 twallace12 commented Feb 16, 2019

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

This comment has been minimized.

Copy link

@4R7I5T 4R7I5T commented Feb 18, 2019

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

@bhack

This comment has been minimized.

Copy link

@bhack bhack commented Feb 18, 2019

@bertagknowles

This comment has been minimized.

Copy link
Author

@bertagknowles bertagknowles commented Feb 18, 2019

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

This comment has been minimized.

Copy link

@studiosi studiosi commented Feb 18, 2019

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

@twallace12

This comment has been minimized.

Copy link

@twallace12 twallace12 commented Feb 19, 2019

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

@philippHRO

This comment has been minimized.

Copy link

@philippHRO philippHRO commented Feb 19, 2019

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

This comment has been minimized.

Copy link
Collaborator

@WuTheFWasThat WuTheFWasThat commented Feb 20, 2019

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

@foobar167

This comment has been minimized.

Copy link

@foobar167 foobar167 commented Apr 16, 2019

Try Anaconda. It has TensorFlow distribution for old CPU.

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