get current version of cudnn code example
Example: find cudnn version
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#or :
cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#or :
cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2