From f2f0b56e204380b56e96816ec0f4767e2d95d853 Mon Sep 17 00:00:00 2001 From: VectorSL Date: Thu, 8 Sep 2022 19:37:19 +0800 Subject: [PATCH] update checkversion for cuda11.6 --- mindspore/python/mindspore/run_check/_check_version.py | 4 ++-- scripts/install/ubuntu-gpu-conda.sh | 7 +++++-- scripts/install/ubuntu-gpu-pip.sh | 9 ++++++--- scripts/install/ubuntu-gpu-source.sh | 7 +++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/mindspore/python/mindspore/run_check/_check_version.py b/mindspore/python/mindspore/run_check/_check_version.py index 97483d1d078..3d2376db950 100644 --- a/mindspore/python/mindspore/run_check/_check_version.py +++ b/mindspore/python/mindspore/run_check/_check_version.py @@ -89,12 +89,12 @@ class GPUEnvChecker(EnvChecker): logger.warning(f"MindSpore version {__version__} and cudDNN version {cudnn_version} " "does not match, please refer to the installation guide for version matching " "information: https://www.mindspore.cn/install. The recommended version is " - "CUDA10.1 with cuDNN7.6.x and CUDA11.1 with cuDNN8.0.x") + "CUDA10.1 with cuDNN7.6.x, CUDA11.1 with cuDNN8.0.x and CUDA11.6 with cuDNN8.5.x.") if cudnn_version and int(cudnn_version) < 800 and int(str(self.v).split('.')[0]) > 10: logger.warning(f"CUDA version {self.v} and cuDNN version {cudnn_version} " "does not match, please refer to the installation guide for version matching " "information: https://www.mindspore.cn/install. The recommended version is " - "CUDA11.1 with cuDNN8.0.x") + "CUDA11.1 with cuDNN8.0.x or CUDA11.6 with cuDNN8.5.x.") def set_env(self): return diff --git a/scripts/install/ubuntu-gpu-conda.sh b/scripts/install/ubuntu-gpu-conda.sh index 3614c3a6baf..9af82c6e4a1 100644 --- a/scripts/install/ubuntu-gpu-conda.sh +++ b/scripts/install/ubuntu-gpu-conda.sh @@ -26,7 +26,7 @@ # Augments: # - PYTHON_VERSION: python version to install. [3.7(default), 3.8, 3.9] # - MINDSPORE_VERSION: mindspore version to install, >=1.6.0 -# - CUDA_VERSION: CUDA version to install. [10.1, 11.1(default)] +# - CUDA_VERSION: CUDA version to install. [10.1, 11.1 11.6(default)] # - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)] # # Usage: @@ -64,7 +64,7 @@ if [[ "$PYTHON_VERSION" == "3.8" && ${MINDSPORE_VERSION:0:3} == "1.6" ]]; then exit 1 fi -available_cuda_version=(10.1 11.1) +available_cuda_version=(10.1 11.1 11.6) if [[ " ${available_cuda_version[*]} " != *" $CUDA_VERSION "* ]]; then echo "CUDA_VERSION is '$CUDA_VERSION', but available versions are [${available_cuda_version[*]}]." exit 1 @@ -144,6 +144,7 @@ cd /tmp declare -A cuda_url_map=() cuda_url_map["10.1"]=https://developer.download.nvidia.cn/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run cuda_url_map["11.1"]=https://developer.download.nvidia.cn/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run +cuda_url_map["11.6"]=https://developer.download.nvidia.cn/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run cuda_url=${cuda_url_map[$CUDA_VERSION]} wget $cuda_url sudo sh ${cuda_url##*/} --silent --toolkit @@ -155,6 +156,7 @@ sudo apt-get update declare -A cudnn_name_map=() cudnn_name_map["10.1"]="libcudnn7=7.6.5.32-1+cuda10.1 libcudnn7-dev=7.6.5.32-1+cuda10.1" cudnn_name_map["11.1"]="libcudnn8=8.0.5.39-1+cuda11.1 libcudnn8-dev=8.0.5.39-1+cuda11.1" +cudnn_name_map["11.6"]="libcudnn8=8.5.0.96-1+cuda11.6 libcudnn8-dev=8.5.0.96-1+cuda11.6" sudo apt-get install --no-install-recommends ${cudnn_name_map[$CUDA_VERSION]} -y # add cuda to path @@ -171,6 +173,7 @@ env_name=mindspore_py3${PYTHON_VERSION##*.} declare -A cudnn_version_map=() cudnn_version_map["10.1"]="7.6.5" cudnn_version_map["11.1"]="8.1.0" +cudnn_version_map["11.6"]="8.5.0" conda create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y conda activate $env_name install_name="mindspore-gpu" diff --git a/scripts/install/ubuntu-gpu-pip.sh b/scripts/install/ubuntu-gpu-pip.sh index 7cccb74cb8e..94362d843fd 100644 --- a/scripts/install/ubuntu-gpu-pip.sh +++ b/scripts/install/ubuntu-gpu-pip.sh @@ -27,7 +27,7 @@ # Augments: # - PYTHON_VERSION: python version to install. [3.7(default), 3.8, 3.9] # - MINDSPORE_VERSION: mindspore version to install, >=1.6.0, required -# - CUDA_VERSION: CUDA version to install. [10.1, 11.1(default)] +# - CUDA_VERSION: CUDA version to install. [10.1, 11.1 11.6(default)] # - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)] # # Usage: @@ -38,7 +38,7 @@ set -e PYTHON_VERSION=${PYTHON_VERSION:-3.7} MINDSPORE_VERSION=${MINDSPORE_VERSION:EMPTY} -CUDA_VERSION=${CUDA_VERSION:-11.1} +CUDA_VERSION=${CUDA_VERSION:-11.6} OPENMPI=${OPENMPI:-off} release_info=$(lsb_release -a | grep Release) UBUNTU_VERSION=${release_info//[!0-9]/} @@ -65,7 +65,7 @@ if [[ "$PYTHON_VERSION" == "3.8" && ${MINDSPORE_VERSION:0:3} == "1.6" ]]; then exit 1 fi -available_cuda_version=(10.1 11.1) +available_cuda_version=(10.1 11.1 11.6) if [[ " ${available_cuda_version[*]} " != *" $CUDA_VERSION "* ]]; then echo "CUDA_VERSION is '$CUDA_VERSION', but available versions are [${available_cuda_version[*]}]." exit 1 @@ -73,6 +73,7 @@ fi declare -A minimum_driver_version_map=() minimum_driver_version_map["10.1"]="418.39" minimum_driver_version_map["11.1"]="450.80.02" +minimum_driver_version_map["11.6"]="510.39.01" driver_version=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader --id=0) if [[ $driver_version < ${minimum_driver_version_map[$CUDA_VERSION]} ]]; then echo "CUDA $CUDA_VERSION minimum required driver version is ${minimum_driver_version_map[$CUDA_VERSION]}, \ @@ -116,6 +117,7 @@ cd /tmp declare -A cuda_url_map=() cuda_url_map["10.1"]=https://developer.download.nvidia.cn/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run cuda_url_map["11.1"]=https://developer.download.nvidia.cn/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run +cuda_url_map["11.6"]=https://developer.download.nvidia.cn/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run cuda_url=${cuda_url_map[$CUDA_VERSION]} wget $cuda_url sudo sh ${cuda_url##*/} --silent --toolkit @@ -127,6 +129,7 @@ sudo apt-get update declare -A cudnn_name_map=() cudnn_name_map["10.1"]="libcudnn7=7.6.5.32-1+cuda10.1 libcudnn7-dev=7.6.5.32-1+cuda10.1" cudnn_name_map["11.1"]="libcudnn8=8.0.5.39-1+cuda11.1 libcudnn8-dev=8.0.5.39-1+cuda11.1" +cudnn_name_map["11.6"]="libcudnn8=8.5.0.96-1+cuda11.6 libcudnn8-dev=8.5.0.96-1+cuda11.6" sudo apt-get install --no-install-recommends ${cudnn_name_map[$CUDA_VERSION]} -y # add cuda to path diff --git a/scripts/install/ubuntu-gpu-source.sh b/scripts/install/ubuntu-gpu-source.sh index 0205432bec6..c8f622ebb23 100644 --- a/scripts/install/ubuntu-gpu-source.sh +++ b/scripts/install/ubuntu-gpu-source.sh @@ -26,7 +26,7 @@ # # Augments: # - PYTHON_VERSION: python version to install. [3.7(default), 3.8, 3.9] -# - CUDA_VERSION: CUDA version to install. [10.1, 11.1(default)] +# - CUDA_VERSION: CUDA version to install. [10.1, 11.1 11.6(default)] # - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)] # - LLVM: whether to install optional dependency LLVM for graph kernel fusion. [on, off(default)] # @@ -37,7 +37,7 @@ set -e PYTHON_VERSION=${PYTHON_VERSION:-3.7} -CUDA_VERSION=${CUDA_VERSION:-11.1} +CUDA_VERSION=${CUDA_VERSION:-11.6} OPENMPI=${OPENMPI:-off} LLVM=${LLVM:-off} release_info=$(lsb_release -a | grep Release) @@ -58,6 +58,7 @@ fi declare -A minimum_driver_version_map=() minimum_driver_version_map["10.1"]="418.39" minimum_driver_version_map["11.1"]="450.80.02" +minimum_driver_version_map["11.6"]="510.39.01" driver_version=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader --id=0) if [[ $driver_version < ${minimum_driver_version_map[$CUDA_VERSION]} ]]; then echo "CUDA $CUDA_VERSION minimum required driver version is ${minimum_driver_version_map[$CUDA_VERSION]}, \ @@ -126,6 +127,7 @@ echo "installing CUDA and cuDNN" declare -A cuda_url_map=() cuda_url_map["10.1"]=https://developer.download.nvidia.cn/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run cuda_url_map["11.1"]=https://developer.download.nvidia.cn/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run +cuda_url_map["11.6"]=https://developer.download.nvidia.cn/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run cuda_url=${cuda_url_map[$CUDA_VERSION]} wget $cuda_url sudo sh ${cuda_url##*/} --silent --toolkit @@ -137,6 +139,7 @@ sudo apt-get update declare -A cudnn_name_map=() cudnn_name_map["10.1"]="libcudnn7=7.6.5.32-1+cuda10.1 libcudnn7-dev=7.6.5.32-1+cuda10.1" cudnn_name_map["11.1"]="libcudnn8=8.0.5.39-1+cuda11.1 libcudnn8-dev=8.0.5.39-1+cuda11.1" +cudnn_name_map["11.6"]="libcudnn8=8.5.0.96-1+cuda11.6 libcudnn8-dev=8.5.0.96-1+cuda11.6" sudo apt-get install --no-install-recommends ${cudnn_name_map[$CUDA_VERSION]} -y # add cuda to path