Skip to content

Instantly share code, notes, and snippets.

@Muhammad-Yunus
Forked from Jongbhin/check_cuda_cudnn.md
Created July 25, 2021 03:24
Show Gist options
  • Save Muhammad-Yunus/d163459d00ca2c72f2b20aea57f7b929 to your computer and use it in GitHub Desktop.
Save Muhammad-Yunus/d163459d00ca2c72f2b20aea57f7b929 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