echo"Invalid gcc path. ${GCC_HOST_COMPILER_PATH} cannot be found"1>&2
if [ -z"$fromuser" ];then
exit 1
fi
GCC_HOST_COMPILER_PATH=""
# Retry
done
# Find out where the CUDA toolkit is installed
OSNAME=`uname -s`
whiletrue;do
# Configure the Cuda SDK version to use.
if [ -z"$TF_CUDA_VERSION" ];then
read -p "Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: " TF_CUDA_VERSION
fi
fromuser=""
if [ -z"$CUDA_TOOLKIT_PATH" ];then
default_cuda_path=/usr/local/cuda
read -p "Please specify the location where CUDA $TF_CUDA_VERSION toolkit is installed. Refer to README.md for more details. [Default is $default_cuda_path]: " CUDA_TOOLKIT_PATH
if [ -e"${CUDA_TOOLKIT_PATH}/${CUDA_RT_LIB_PATH}" ];then
export CUDA_TOOLKIT_PATH
export TF_CUDA_VERSION
break
fi
echo"Invalid path to CUDA $TF_CUDA_VERSION toolkit. ${CUDA_TOOLKIT_PATH}/${CUDA_RT_LIB_PATH} cannot be found"
if [ -z"$fromuser" ];then
exit 1
fi
# Retry
TF_CUDA_VERSION=""
CUDA_TOOLKIT_PATH=""
done
# Find out where the cuDNN library is installed
whiletrue;do
# Configure the Cudnn version to use.
if [ -z"$TF_CUDNN_VERSION" ];then
read -p "Please specify the Cudnn version you want to use. [Leave empty to use system default]: " TF_CUDNN_VERSION
fi
fromuser=""
if [ -z"$CUDNN_INSTALL_PATH" ];then
default_cudnn_path=${CUDA_TOOLKIT_PATH}
read -p "Please specify the location where cuDNN $TF_CUDNN_VERSION library is installed. Refer to README.md for more details. [Default is $default_cudnn_path]: " CUDNN_INSTALL_PATH
fromuser="1"
if [ -z"$CUDNN_INSTALL_PATH" ];then
CUDNN_INSTALL_PATH=$default_cudnn_path
fi
# Result returned from "read" will be used unexpanded. That make "~" unuseable.
# Going through one more level of expansion to handle that.