Closed edwardyehuang closed 5 months ago
I don’t doubt what you are saying but It would really help if you provided the code to validate that the GPU isn’t being used.
import tensorflow as tf
a = tf.constant(2) + 2
In 2.15, only the CPU is used, and the above code works fine in <=2.14
All versions are installed via conda install -c conda-forge tensorflow-gpu==xxxx
If you can make the above an assert statement, we can add it to our tests suite. Can you try to have an assert statement in your test please.
The test I found that fails with tensorflow 2.15.0 is:
import tensorflow as tf
assert len(tf.config.list_physical_devices(device_type='CPU')), "No CPU devices found"
assert len(tf.config.list_physical_devices(device_type='GPU')), "No GPU devices found"
with tensorflow 2.13 + cuda 11.8 on my machine it passes.
@jakirkham @xhochy any clues (just in case you are looking to burn free time today!)
>>> import tensorflow as tf
2023-12-29 16:17:51.727737: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
>>> tf.test.is_built_with_cuda()
False
tensorflow 2.15.0 cuda120py311h5cbd639_1 conda-forge
tensorflow-base 2.15.0 cuda120py311h43b5e44_1 conda-forge
tensorflow-estimator 2.15.0 cuda120py311hf663016_1 conda-forge
The GPU versions have the same size as the CPU versions, which should be incorrect:
Good observation.
Sorry for not catching this earlier.
We should probably mark the GPU builds here as broken.
Thank you. I tested it and it worked.
Solution to issue cannot be found in the documentation.
Issue
2.15 does not use GPU. Other versions do
Installed packages
Environment info