Skip to content

Instantly share code, notes, and snippets.

@Jongbhin
Last active February 10, 2024 23:24
Show Gist options
  • Save Jongbhin/ad9aac8369751dbd84ca6a266a507bc7 to your computer and use it in GitHub Desktop.
Save Jongbhin/ad9aac8369751dbd84ca6a266a507bc7 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()

@fahnub
Copy link

fahnub commented Mar 31, 2023

Thanks @lgg @bionicles

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