From bb5a14ddb1fff98ea287550c8afd210a3f2e22b3 Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Sat, 7 May 2022 10:11:18 +0800 Subject: [PATCH] support set cuda_arch_name in pipeline (#42498) * set auto to reduce core_avx/noavx.pyd size * set CUDA_ARCH_NAME in each case --- paddle/scripts/paddle_build.bat | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index f4a09436d86..36154b23f3f 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -57,7 +57,6 @@ rem ------initialize common variable------ if not defined GENERATOR set GENERATOR="Visual Studio 15 2017 Win64" if not defined WITH_TENSORRT set WITH_TENSORRT=ON if not defined TENSORRT_ROOT set TENSORRT_ROOT=D:/TensorRT -if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto if not defined WITH_GPU set WITH_GPU=ON if not defined WITH_MKL set WITH_MKL=ON if not defined WITH_AVX set WITH_AVX=ON @@ -229,6 +228,7 @@ set MSVC_STATIC_CRT=OFF set ON_INFER=OFF set WITH_TENSORRT=ON set WITH_INFERENCE_API_TEST=OFF +if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto call :cmake || goto cmake_error call :build || goto build_error @@ -243,6 +243,7 @@ set WITH_GPU=OFF set WITH_AVX=OFF set MSVC_STATIC_CRT=ON set ON_INFER=OFF +if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto call :cmake || goto cmake_error call :build || goto build_error @@ -260,6 +261,7 @@ set ON_INFER=ON set WITH_TENSORRT=ON set WITH_INFERENCE_API_TEST=ON set WITH_ONNXRUNTIME=ON +if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto call :cmake || goto cmake_error call :build || goto build_error @@ -274,7 +276,7 @@ rem ------Build windows avx whl package------ :CASE_build_avx_whl set WITH_AVX=ON set ON_INFER=OFF -set CUDA_ARCH_NAME=All +if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=All call :cmake || goto cmake_error call :build || goto build_error @@ -285,7 +287,7 @@ rem ------Build windows no-avx whl package------ :CASE_build_no_avx_whl set WITH_AVX=OFF set ON_INFER=OFF -set CUDA_ARCH_NAME=All +if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=All call :cmake || goto cmake_error call :build || goto build_error @@ -296,7 +298,8 @@ rem ------Build windows inference library------ :CASE_build_inference_lib set ON_INFER=ON set WITH_PYTHON=OFF -set CUDA_ARCH_NAME=All +if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=All + python %work_dir%\tools\remove_grad_op_and_kernel.py if %errorlevel% NEQ 0 exit /b 1 -- GitLab