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

Install from pip, run test and results in "illegal instruction" for tensorflow-gpu #29788

Closed
AlexYoung757 opened this issue Jun 14, 2019 · 11 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author subtype:centos Centos Build/Installation issues type:build/install Build and install issues

Comments

@AlexYoung757
Copy link

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOs 7.5
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow installed from (source or binary): pip per https://www.tensorflow.org/install/pip
  • TensorFlow version: 1.11.0
  • Python version: 3.6.8
  • Installed using virtualenv? pip? conda?: N/A
  • Bazel version (if compiling from source):N/A
  • GCC/Compiler version (if compiling from source):N/A
  • CUDA/cuDNN version: cuda9.0 and cudnn7.0
  • GPU model and memory: Tesla P100

Describe the problem
when i import tensorflow,the error as follow:
illegal instruction
i don't know why,please help me.

@8bitmp3
Copy link
Contributor

8bitmp3 commented Jun 16, 2019

Which version of TF are you trying to use?

See #17411 , #19809 and https://stackoverflow.com/questions/49094597/illegal-instruction-core-dumped-after-running-import-tensorflow

Also maybe try running it in a virtualenv with Python 3.6 then pip3 install tensorflow-gpu or even 2.0 tensorflow-gpu==2.0.0-beta1. Check the full instructions on how to install with pip or docker here.

@AlexYoung757
Copy link
Author

AlexYoung757 commented Jun 17, 2019

@8bitmp3 thank you for your reply. emm, i us tf1.11. In fact, i just want do some try on bert and i must upgrade tf. I use pip but the result is too bad. errors alway go on.
so, i use conda, but another error happen. that's very terribel!! please save me~~

@gadagashwini-zz gadagashwini-zz self-assigned this Jun 17, 2019
@gadagashwini-zz gadagashwini-zz added subtype:centos Centos Build/Installation issues type:build/install Build and install issues labels Jun 17, 2019
@gadagashwini-zz
Copy link
Contributor

@8bitmp3 thank you for your reply. emm, i us tf1.11. In fact, i just want do some try on bert and i must upgrade tf. I use pip but the result is too bad. errors alway go on.
so, i use conda, but another error happen. that's very terribel!! please save me~~

Can you include error message that you are getting. Thanks!

@gadagashwini-zz gadagashwini-zz added the stat:awaiting response Status - Awaiting response from author label Jun 17, 2019
@AlexYoung757
Copy link
Author

@gadagashwini here is the detail:
tensorflow.python.framework.errors_impl.InternalError: failed initializing StreamExecutor for CUDA device ordinal 0: Internal: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_NOT_SUPPORTED: operation not supported

@gadagashwini-zz gadagashwini-zz removed the stat:awaiting response Status - Awaiting response from author label Jun 18, 2019
@gadagashwini-zz
Copy link
Contributor

@AlexYoung757 Just to verify, did you add the lib and bin to path? Thanks!

@gadagashwini-zz gadagashwini-zz added the stat:awaiting response Status - Awaiting response from author label Jun 18, 2019
@AlexYoung757
Copy link
Author

@gadagashwini yep! i am sure that i add the lib and bin to path. i can use the command: nvcc -v
to verify

@gadagashwini-zz gadagashwini-zz removed the stat:awaiting response Status - Awaiting response from author label Jun 19, 2019
@ymodak
Copy link
Contributor

ymodak commented Jun 20, 2019

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. I suspect that your CPU model does not support AVX instruction set. Can you please confirm?. Thanks!

@ymodak ymodak added the stat:awaiting response Status - Awaiting response from author label Jun 20, 2019
@AlexYoung757
Copy link
Author

@ymodak thank you for your reply. en i find that my cpu model does not support AVX instruction set. it only supports sse 、sse2 .
so if i want to install tensorflow 1.11 , what should i do. Maybe i must install from source code?

@ymodak
Copy link
Contributor

ymodak commented Jun 25, 2019

(1) The easiest way to use TF will be to switch to google colab. You get pre-installed stable TF version on it (currently running TF 1.14). Also you can use pip install to install any other preferred TF version if required.
It has added advantage since you can you easily switch to different hardware accelerators (cpu, gpu, tpu) as per the task. All you need is good internet connection and you are all set.
(2) You have build TF from sources by changing CPU optimization flags.
(3) Another option will be to install TF version 1.5 on your local machine.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jun 26, 2019
@ymodak ymodak added the stat:awaiting response Status - Awaiting response from author label Jun 26, 2019
@AlexYoung757
Copy link
Author

@ymodak . thanks , i have solved this problem. After modify the AVX instruction sets ,all the question has done.

@ymodak
Copy link
Contributor

ymodak commented Jun 28, 2019

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author subtype:centos Centos Build/Installation issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

5 participants