diff options
-rwxr-xr-x | configure | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -174,6 +174,19 @@ while true; do if [[ -z "$TF_CUDNN_VERSION" ]]; then TF_CUDNN_EXT="" + # Resolve to the SONAME of the symlink. Use readlink without -f + # to resolve exactly once to the SONAME. E.g, libcudnn.so -> + # libcudnn.so.4 + REALVAL=`readlink ${CUDNN_INSTALL_PATH}/lib64/libcudnn.so` + + # Extract the version of the SONAME, if it was indeed symlinked to + # the SONAME version of the file. + if [[ "$REALVAL" =~ .so[.]+([0-9]*) ]]; + then + TF_CUDNN_EXT="."${BASH_REMATCH[1]} + TF_CUDNN_VERSION=${BASH_REMATCH[1]} + echo "libcudnn.so resolves to libcudnn${TF_CUDNN_EXT}" + fi else TF_CUDNN_EXT=".$TF_CUDNN_VERSION" fi |