*******> update.13 Author: David Case Date: January 4, 2021 Programs: pmemd.cuda, other cuda codes Description: Adds support for CUDA SDK 11.1 for both CMake and legacy builds -------------------------------------------------------------------------------- AmberTools/src/configure2 | 10 ++++++++-- cmake/CudaConfig.cmake | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git AmberTools/src/configure2 AmberTools/src/configure2 index e5255f7eff..dfe85ff917 100755 --- AmberTools/src/configure2 +++ AmberTools/src/configure2 @@ -1250,34 +1250,40 @@ if [ "$cuda" = 'yes' ]; then sm30flags='-gencode arch=compute_30,code=sm_30' cudaversion=`$nvcc --version | grep 'release' | cut -d' ' -f5 | cut -d',' -f1` - if [ "$cudaversion" = "11.0" ]; then + if [ "$cudaversion" = "11.0" -o "$cudaversion" = "11.1" ]; then # Implement the standard, not warp synchronous, compilation + sm80flags-'-gencode arch=compute_80,code=sm_80' sm75flags='-gencode arch=compute_75,code=sm_75' sm70flags='-gencode arch=compute_70,code=sm_70' echo "CUDA Version $cudaversion detected" echo "Configuring for SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, SM7.0, SM7.5 and SM8.0" nvccflags="$sm50flags $sm52flags $sm53flags $sm60flags $sm61flags $sm70flags $sm75flags $sm80flags -Wno-deprecated-declarations" + elif [ "$cudaversion" = "10.0" -o "$cudaversion" = "10.1" -o "$cudaversion" = "10.2" ]; then echo "CUDA Version $cudaversion detected" echo "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, SM7.0 and SM7.5" nvccflags="$sm30flags $sm35flags $sm37flags $sm50flags $sm52flags $sm53flags $sm60flags $sm61flags $sm70flags $sm75flags -Wno-deprecated-declarations" + elif [ "$cudaversion" = "9.0" -o "$cudaversion" = "9.1" -o "$cudaversion" = "9.2" ]; then echo "CUDA Version $cudaversion detected" echo "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1 and SM7.0" nvccflags="$sm30flags $sm35flags $sm37flags $sm50flags $sm52flags $sm53flags $sm60flags $sm61flags $sm70flags -Wno-deprecated-declarations" + elif [ "$cudaversion" = "8.0" ]; then echo "CUDA Version $cudaversion detected" echo "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2, SM5.3, SM6.0 and SM6.1" echo "BE AWARE: CUDA 8.0 does not support V100, GV100, Titan-V or later GPUs." nvccflags="$sm30flags $sm35flags $sm37flags $sm50flags $sm52flags $sm53flags $sm60flags $sm61flags" + elif [ "$cudaversion" = "7.5" ]; then echo "CUDA Version $cudaversion detected" echo "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2 and SM5.3" echo "BE AWARE: CUDA 7.5 does not support GTX-1080, Titan-XP, DGX-1, V100 or other Pascal/Volta based or later GPUs." nvccflags="$sm30flags $sm35flags $sm37flags $sm50flags $sm52flags $sm53flags" + else echo "Error: Unsupported CUDA version $cudaversion detected." - echo " Amber requires CUDA version 7.5, 8.0, 9.0-9.2, or 10.0-10.2" + echo " Amber requires CUDA version 7.5, 8.0, 9.0-9.2, 10.0-10.2 or 11.0-11.1" exit 1 fi nvcc="$nvcc $nvccflags" diff --git cmake/CudaConfig.cmake cmake/CudaConfig.cmake index fb9e5de741..416a845065 100644 --- cmake/CudaConfig.cmake +++ cmake/CudaConfig.cmake @@ -64,7 +64,7 @@ else() elseif((${CUDA_VERSION} VERSION_GREATER_EQUAL 10.0) AND (${CUDA_VERSION} VERSION_LESS 11.0)) message(STATUS "Configuring for SM3.0, SM3.5, SM3.7, SM5.0, SM5.2, SM5.3, SM6.0, SM6.1, SM7.0 and SM7.5") list(APPEND CUDA_NVCC_FLAGS ${SM30FLAGS} ${SM50FLAGS} ${SM52FLAGS} ${SM53FLAGS} ${SM60FLAGS} ${SM61FLAGS} ${SM70FLAGS} ${SM75FLAGS} -Wno-deprecated-gpu-targets -Wno-deprecated-declarations) - elseif(${CUDA_VERSION} VERSION_EQUAL 11.0) + elseif(${CUDA_VERSION} VERSION_GREATER_EQUAL 11.0) # Implement the standard compilation rather than a warp-synchronous one, which is deprecated as of CUDA 11 set(SM70FLAGS -gencode arch=compute_70,code=sm_70) set(SM75FLAGS -gencode arch=compute_75,code=sm_75)