To install TensorFlow with CUDA support, follow these step-by-step instructions.
TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows.
Ref: https://www.tensorflow.org/install/pi...
Download and install cuda and cudnn - Match TensorFlow version with the appropriate CUDA and cuDNN versions
https://www.tensorflow.org/install/so...
We are downloading tensorflow 2.10 which required cuda 11.2 and cudnn 8.1
pip install tensorflow==2.10.0
How to Confirm GPU Usage?
import tensorflow as tf
Check if TensorFlow is using the GPU
if tf.config.list_physical_devices('GPU'):
print("TensorFlow is using the GPU!")
Get list of available GPUs
gpus = tf.config.list_physical_devices('GPU')
print("Available GPUs:", gpus)
Get details of each GPU
for gpu in gpus:
details = tf.config.experimental.get_device_details(gpu)
print("GPU Details:", details)
else:
print("TensorFlow is using the CPU.")
Output:
TensorFlow is using the GPU!
Available GPUs: [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
GPU Details: {'device_name': 'NVIDIA GeForce RTX 3090', 'compute_capability': (8, 6)}
#tensorflow #computervision #cuda #nvidia
On this page of the site you can watch the video online Install Tensorflow with GPU support on windows with a duration of hours minute second in good quality, which was uploaded by the user Code With Aarohi Hindi 04 December 2024, share the link with friends and acquaintances, this video has already been watched 12,614 times on youtube and it was liked by 235 viewers. Enjoy your viewing!