Skip to content
Snippets Groups Projects
Commit 2237d7c6 authored by patmjen's avatar patmjen
Browse files

Improve search for cuDNN in init script

Some cuDNN modules on the system are just listed as CUDA_MAJOR_VERSION.X. Thus, if no cuDNN module is found for the exact CUDA version, we then look for a .X module.
parent 7fc5c520
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,12 @@ module load $(module avail -o modulepath -t -C "python-${PYTHON_VERSION}" 2>&1 |
module load $(module avail -o modulepath -t -C "python-${PYTHON_VERSION}" 2>&1 | grep "pandas/")
module load cuda/$CUDA_VERSION
CUDNN_MOD=$(module avail -o modulepath -t cudnn 2>&1 | grep "cuda-${CUDA_VERSION}" | sort | tail -n1)
if [ -z "$CUDNN_MOD" ]
then
# Could find cuDNN for exact CUDA version, try to find major.X version
CUDA_VERSION_MAJOR=$(echo $CUDA_VERSION | cut -d. -f1)
CUDNN_MOD=$(module avail -o modulepath -t cudnn 2>&1 | grep "cuda-${CUDA_VERSION_MAJOR}.X" | sort | tail -n1)
fi
if [[ ${CUDNN_MOD} ]]
then
module load ${CUDNN_MOD}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment