Skip to content

Instantly share code, notes, and snippets.

@josepsmartinez
Created August 8, 2022 14:50
Show Gist options
  • Save josepsmartinez/01f7de59b75d339fde89d28539cf8bfa to your computer and use it in GitHub Desktop.
Save josepsmartinez/01f7de59b75d339fde89d28539cf8bfa to your computer and use it in GitHub Desktop.
cudnn version
#!/bin/bash
h=$(whereis -f cudnn.h | cut -f2 -d' ')
MAJOR=$(cat $h | grep CUDNN_MAJOR | head -n 1 | cut -f3 -d ' ')
MINOR=$(cat $h | grep CUDNN_MINOR | head -n 1 | cut -f3 -d ' ')
PATCHLEVEL=$(cat $h | grep CUDNN_PATCHLEVEL | head -n 1 | cut -f3 -d ' ')
echo "$MAJOR.$MINOR.$PATCHLEVEL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment