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

tf.test.is_built_with_cuda() is 'False' #68236

Closed
Viper373 opened this issue May 19, 2024 · 6 comments
Closed

tf.test.is_built_with_cuda() is 'False' #68236

Viper373 opened this issue May 19, 2024 · 6 comments
Assignees
Labels
subtype:windows Windows Build/Installation Issues TF 2.16 type:build/install Build and install issues

Comments

@Viper373
Copy link

Issue type

Build/Install

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

tf 2.16.1

Custom code

Yes

OS platform and distribution

Windows 10

Mobile device

No response

Python version

3.10.7

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

CUDA12.3 cuDNN8.9.7

GPU model and memory

NVIDIA GeForce RTX 4070 super

Current behavior?

import tensorflow as tf
print("TensorFlow version:", tf.version)
print("Is GPU available?", tf.config.list_physical_devices('GPU'))
print("Is TensorFlow built with CUDA?:", tf.test.is_built_with_cuda())

result:
TensorFlow version: 2.16.1
Is GPU available? []
Is TensorFlow built with CUDA?: False
屏幕截图 2024-05-20 050134
The command I am using is "pip install tensorflow-2.16.1-cp310-cp310-win_amd64.whl --force"
And I have already installed CUDA and cuDNN through NVIDIA's official website
屏幕截图 2024-05-20 050506
屏幕截图 2024-05-20 050520
屏幕截图 2024-05-20 050717
I am working on a graduation project for LSTM model prediction,Please help me, thank you!!!

Standalone code to reproduce the issue

import tensorflow as tf
print("TensorFlow version:", tf.__version__)
print("Is GPU available?", tf.config.list_physical_devices('GPU'))
print("Is TensorFlow built with CUDA?:", tf.test.is_built_with_cuda())

Relevant log output

TensorFlow version: 2.16.1
Is GPU available? []
Is TensorFlow built with CUDA?: False
@google-ml-butler google-ml-butler bot added the type:build/install Build and install issues label May 19, 2024
@Viper373
Copy link
Author

please help me!!!thanks!😭😭😭

@tilakrayal tilakrayal added TF 2.16 subtype:windows Windows Build/Installation Issues labels May 20, 2024
@tilakrayal
Copy link
Contributor

@Viper373,
Could you please confirm whether you are trying to install TensorFlow v2.16 on Windows with GPU? If you are trying the same, TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install TensorFlow in WSL2, or install tensorflow-cpu and, optionally, try the TensorFlow-DirectML-Plugin

https://www.tensorflow.org/install/pip#windows-native_1

Thank you!

@tilakrayal tilakrayal added the stat:awaiting response Status - Awaiting response from author label May 20, 2024
@Viper373
Copy link
Author

,您能否确认您是否正在尝试在带有 GPU 的 Windows 上安装 TensorFlow v2.16?如果您正在尝试相同的方法,TensorFlow 2.10 是本机 Windows 上支持 GPU 的最后一个 TensorFlow 版本。从 TensorFlow 2.11 开始,您需要在 WSL2 中安装 TensorFlow,或者安装 tensorflow-cpu,并根据需要尝试 TensorFlow-DirectML-Plugin

https://www.tensorflow.org/install/pip#windows-native_1

谢谢!

I am certain that my Windows machine comes with a GPU, model 4070 super. Additionally, my Python version is 3.10.7, and I have installed cuda version 12.3 and cuDNN version 8.9.7. What version do I need to install? Can you help me write the corresponding Python, CUDA, and CUDNN versions for TF2.10

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label May 20, 2024
@tilakrayal
Copy link
Contributor

@Viper373,
The compatible tested build configurations for TensorFlow v2.10 on Windows are tensorflow_gpu-2.10.0, python 3.7-3.10 Compiler - MSVC 2019, Bazel 5.1.1, cuDNN-8.1, CUDA-11.2.
https://www.tensorflow.org/install/source_windows#gpu

Thank you!

@tilakrayal tilakrayal added the stat:awaiting response Status - Awaiting response from author label May 21, 2024
@Viper373
Copy link
Author

@Viper373, The compatible tested build configurations for TensorFlow v2.10 on Windows are tensorflow_gpu-2.10.0, python 3.7-3.10 Compiler - MSVC 2019, Bazel 5.1.1, cuDNN-8.1, CUDA-11.2. https://www.tensorflow.org/install/source_windows#gpu

Thank you!

thank you a lot!!!

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label May 22, 2024
Copy link

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
subtype:windows Windows Build/Installation Issues TF 2.16 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

2 participants