How to enable GPU support with TensorFlow (Windows) (For High Holborn only)
This article will guide you through how to enable GPU computing for Tensorflow on High Holborn DELL PCs.
The current version of Cuda Toolkit installed on DELL PCs is v12.2, but because the cuDNN library isn’t pre-installed, each student wanting to use tensorflow with GPU enabled should create a new environment using Anaconda Prompt and follow these steps:
- Create a new conda enviroment with a Python version ranging from 3.7 to 3.10
conda create -n ENV_NAME python=3.10 - Install tensorflow 2.10
pip install tensorflow==2.10.0 - Install cuDNN from conda forge
conda install -c conda-forge cudnn=8.1.0 - Test tensorflow
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
If the last command returned:
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Tensorflow is ready to go!