Skip to content

Instantly share code, notes, and snippets.

@zldrobit
Forked from Jongbhin/check_cuda_cudnn.md
Created June 19, 2020 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zldrobit/778f36ca7ee0f6857069d584b0868f54 to your computer and use it in GitHub Desktop.
Save zldrobit/778f36ca7ee0f6857069d584b0868f54 to your computer and use it in GitHub Desktop.
[Cuda cudnn version check] #cuda #cudnn #nvidia

To check nvidia driver

modinfo nvidia

To check cuda version

cat /usr/local/cuda/version.txt
nvcc  --version

To check cudnn version

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2

To check GPU Card info

nvidia-smi

Python (Show what version of tensorflow in your PC.)

  • for Python 2
python -c 'import tensorflow as tf; print(tf.__version__)'  
  • for Python 3
python3 -c 'import tensorflow as tf; print(tf.__version__)'  
gpu check

CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=1 python import pytorch torch.cuda.current_device()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment