Install tensorflow GPU 2.1.0
install python3.7.8, pip21: https://www.python.org/downloads/release/python-378/
install tensorflow: pip install tensorflow-gpu==2.1.0
download cudnn: https://developer.nvidia.com/rdp/cudnn-archive
cudnn 7.6.5 for cuda 10.01 |
install cuda 10.1: https://developer.nvidia.com/cuda-10.1-download-archive-update2
set enviroment:
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64;%PATH%
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include;%PATH%
SET PATH=C:\tools\cuda\bin;%PATH%
Python Test Tensorflow:
from tensorflow.python.client import device_lib
def get_available_gpus():
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']
print(get_available_gpus())
1 comment