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

iris gpu #145

Open
laureneb26 opened this issue Apr 1, 2021 · 6 comments
Open

iris gpu #145

laureneb26 opened this issue Apr 1, 2021 · 6 comments

Comments

@laureneb26
Copy link

Hi Hugues.
Nice work you've done there. I would like to analyze some datasets with your code but because I don't have NVIDIA, rather intel iris plus gpu, I am not able to perform the compilation steps that use cuda.
Can you help?
Thanks

@HuguesTHOMAS
Copy link
Owner

Hi @laureneb26,

First I am sorry to tell you that it is not possible to use Tensorflow (or PyTorch by the way) with anything else than NVIDIA GPUs. This is because they both use CUDA. Your only solution here is to use the CPU version of Tensorflow, which will be extremely (EXTREMELY) slow.

If you want to do it anyway, follow the compilation steps, just ignore the first one with CUDA and install TensorFlow version 1.12.

Best,
Hugues

@laureneb26
Copy link
Author

I decided to do the implementation on google colab to benefit from the gpu and import your code from google drive.

I get the following error with tensorflow:
2021-04-02 05:03:39.095583: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
/usr/bin/ld: cannot find -ltensorflow_framework
collect2: error: ld returned 1 exit status

How do I know if .so file successfully compiled?

@laureneb26
Copy link
Author

I tried to downgrade the tensorflow version to 1.12 but it raises the following error

Could not find a version that satisfies the requirement tensorflow==1.12 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0rc0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.5.0rc0)
ERROR: No matching distribution found for tensorflow==1.12

So I am a little bit stuck at this point

@HuguesTHOMAS
Copy link
Owner

HuguesTHOMAS commented Apr 2, 2021

Well, any 1.14 or 1.15 version should be fine.

Concerning your error cannot find -ltensorflow_framework, does it happen when you try to compile the tf_ops? If you have TensorFlow installed in a virtual env, you need to activate it when compiling the tf_ops.

You will know if the .so file successfully compiled if you don't have any error message and if the .so file is indeed created.

@laureneb26
Copy link
Author

yes exactly when compiling:
!bash compile_op.sh

I imported tf as such
!pip install tensorflow-gpu==1.15
import tensorflow as tf
print(tf.version)

The libtensorflow_framework.so file is created under and found under:
!cd /usr/local/lib/

but still get this error like it cannot find the package
/usr/bin/ld: cannot find -ltensorflow_framework
collect2: error: ld returned 1 exit status

@HuguesTHOMAS
Copy link
Owner

When you start compile_op.sh, you need to be in an environment where tensorflow is installed. If you have installed tensorflow in a venv you need to activate it.

Otherwise look at this issue too
#79

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

2 participants