-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Tensorflow not detecting GPU #64881
Comments
Hi @RetusRieben ,
Thank you! |
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" the following output is generated if I run python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" My user has ROOT rights |
I tried installing Tensorflow using both conda and pip. My Nvidia Gpu is not detected when I do print(tf.config.list_physical_devices('GPU')). I had installed using python3 -m pip install tensorflow[and-cuda]. Should i try Tensorflow version 2.15.1? |
Same issue here. # python -c "import tensorflow as tf; print(tf.config.list_physical_devices())"
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')] |
I experience same issue with TF 2.16.1, to be honest only workable fix for me was to rollback to 2.15.1 |
Apparently, TF has not been compiled with CUDA for windows, which is outrageous in this day and age. All documentation state to downgrade to some other version or recompile use WSL. Both ridiculous statements just showing laziness for wanting to dive into the issue. If you can do it before, and in WSL, it should be straight forward to do it also in MSYS/MinGW. PS. I don't roll back, I only roll forward! |
I absolutely agree. I now also installed it also on Win11 and the only way I managed to do so was via Conda. For someone that is not allowed to use conda that is a big issue, I did not find another way. But that is a indeed ridiculous. |
@RetusRieben or pip but install TF 2.15.1 (I’m not saying it’s great solution, but at least working somehow) Agreed with you both, that it’s just outrageous not compile libs properly. Hope it will be fixed soon |
I wonder if we could extract the latest TF package binaries from Conda, as it seem to work there? Maybe install Conda in VM and lookup the packages. Sad way to have to fix this though. |
Wonder why it is so difficult to install Tensor flow for GPU now. Tensor
Flow 2.16.1 is so full of bugs and can only work on WSL and that too
doesn't detect my GPU. Tried on different machines with same issue of
Nvidia GPU not being detected. Only solution was to roll back to 2.15.1
that too after getting some weird warnings after command executions. Would
prefer to use PyTorch instead of TensorFlow. PyTorch is so easy to install
& use with minimum complications.
…On Wed, May 15, 2024, 10:56 PM eabase ***@***.***> wrote:
I wonder if we could extract the latest TF package binaries from Conda, as
it seem to work there? Maybe install Conda in VM and lookup the packages.
Sad way to have to fix this though.
—
Reply to this email directly, view it on GitHub
<#64881 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIVENFB4235FWSAL5XFQHOLZCOOTRAVCNFSM6AAAAABFSYT73OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJTGEZDOMJSGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Unfortunately, like all you, I wasn't able to access my GPU as backend in TF. I have also tried all the way of installing it -pip, .deb, .tar... It's very hard to access GPU with other versions. At last, I found a method for accessing GPU as backend, only by using python3.11 and TensorFlow 2.15.1, other than these versions nothing suits. try this by creating a virtual environment:
if all your GPU driver and cuda is installed, you should be able to run this command:
to check if GPU is detected by TF:
probably you should get:
Let me know, if this works for you all! |
@MohanKrishnaGR That is the annoying fact.
If possible, can you please help by:
References: |
My Gpu is detected but I get a long cryptic warning when I use the relevant
command for detecting gpu in 2.15.1. When I tried to do conda update my
tensorflow version changed to cpu one ??
…On Wed, 22 May 2024 at 10:24 PM, eabase ***@***.***> wrote:
@MohanKrishnaGR <https://github.com/MohanKrishnaGR>
What OS did you install this on? (Via WSL or native conda on Win?)
That is the annoying fact.
1. You can install with Conda which is totally Python made. So Conda
installs some (unknow, but working) CUDA packages.
2. Python 11, is can't be *that* different from 12, so what changed
and how to fix?
—
Reply to this email directly, view it on GitHub
<#64881 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIVENFAOSJ3NO7PDXJLZFMDZDTIDPAVCNFSM6AAAAABFSYT73OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVGM3TKOBRGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@mhlhr There's no point of telling us it is cryptic, unless you also provide the message... 😉 |
This duplicates #63362 (edit: changed to right issue) |
Issue type
Build/Install
Have you reproduced the bug with TensorFlow Nightly?
No
Source
binary
TensorFlow version
2.16.1
Custom code
No
OS platform and distribution
SUSE Linux Enterprise Server 15 SP3
Mobile device
No response
Python version
3.10.13
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
CUDA 12.4
GPU model and memory
NVIDIA A2, 16GB
Current behavior?
TensorFlow is not recognising the NVIDIA A2 GPU or any other CUDA devices on my Server.
Standalone code to reproduce the issue
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
Relevant log output
The text was updated successfully, but these errors were encountered: