From 3fc698fb16998305697cc22bbb5c49369681b9fe Mon Sep 17 00:00:00 2001 From: Zhanlue Yang Date: Wed, 2 Mar 2022 19:37:43 +0800 Subject: [PATCH] Adjust GPU Arches for next level Whl release strategy (#39910) * Adjust GPU Arches for Whl releases * Adjusted CUDA arches * fixed minor issue * adjusted gpu arches --- CMakeLists.txt | 3 ++- cmake/cuda.cmake | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b499fb43a..4c5f711d29 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,7 +238,8 @@ option(WITH_MIPS "Compile PaddlePaddle with mips support" OFF) option(WITH_MUSL "Compile with musl libc instead of gblic" OFF) option(WITH_UNITY_BUILD "Compile with UnityBuild mode" OFF) option(WITH_STRIP "Strip so files of Whl packages" OFF) -option(NEW_RELEASE_CUBIN "PaddlePaddle next-level release strategy for pypi cubin package" OFF) +option(NEW_RELEASE_PYPI "PaddlePaddle next-level release strategy for pypi cubin package" OFF) +option(NEW_RELEASE_ALL "PaddlePaddle next-level release strategy for all arches cubin package" OFF) option(NEW_RELEASE_JIT "PaddlePaddle next-level release strategy for backup jit package" OFF) option(WITH_ASCEND_INT64 "Compile with int64 kernel for ascend NPU" OFF) option(WITH_POCKETFFT "Compile with pocketfft support" ON) diff --git a/cmake/cuda.cmake b/cmake/cuda.cmake index 34c079ba71..312a030524 100644 --- a/cmake/cuda.cmake +++ b/cmake/cuda.cmake @@ -6,16 +6,22 @@ if(WITH_NV_JETSON) add_definitions(-DWITH_NV_JETSON) set(paddle_known_gpu_archs "53 62 72") set(paddle_known_gpu_archs10 "53 62 72") -elseif(NEW_RELEASE_CUBIN) +elseif(NEW_RELEASE_ALL) + message("Using New Release Strategy - All Arches Packge") + add_definitions(-DNEW_RELEASE_ALL) + set(paddle_known_gpu_archs "35 50 52 60 61 70 75 80 86") + set(paddle_known_gpu_archs10 "35 50 52 60 61 70 75") + set(paddle_known_gpu_archs11 "35 50 52 60 61 70 75 80") +elseif(NEW_RELEASE_PYPI) message("Using New Release Strategy - Cubin Packge") - add_definitions(-DNEW_RELEASE_CUBIN) - set(paddle_known_gpu_archs "35 37 50 52 60 61 70 75 80 86") - set(paddle_known_gpu_archs10 "50 60 70 75") - set(paddle_known_gpu_archs11 "60 70 75 80") + add_definitions(-DNEW_RELEASE_PYPI) + set(paddle_known_gpu_archs "35 50 52 60 61 70 75 80 86") + set(paddle_known_gpu_archs10 "") + set(paddle_known_gpu_archs11 "60 61 70 75 80") elseif(NEW_RELEASE_JIT) message("Using New Release Strategy - JIT Packge") add_definitions(-DNEW_RELEASE_JIT) - set(paddle_known_gpu_archs "35 37 50 52 60 61 70 75 80 86") + set(paddle_known_gpu_archs "35 50 52 60 61 70 75 80 86") set(paddle_known_gpu_archs10 "35 50 60 70 75") set(paddle_known_gpu_archs11 "35 50 60 70 75 80") else() @@ -148,7 +154,7 @@ function(select_nvcc_arch_flags out_variable) # remove dots and convert to lists string(REGEX REPLACE "\\." "" cuda_arch_bin "${cuda_arch_bin}") - string(REGEX REPLACE "\\." "" cuda_arch_ptx "${CUDA_ARCH_PTX}") + string(REGEX REPLACE "\\." "" cuda_arch_ptx "${cuda_arch_ptx}") string(REGEX MATCHALL "[0-9()]+" cuda_arch_bin "${cuda_arch_bin}") string(REGEX MATCHALL "[0-9]+" cuda_arch_ptx "${cuda_arch_ptx}") -- GitLab