import tensorflow as tf tf.test.gpu_device_name() # Bash # $ CUDNN_H_PATH=$(whereis cudnn.h) #$ cat ${CUDNN_H_PATH} | grep CUDNN_MAJOR