未验证 提交 bb5a14dd 编写于 作者: S Sing_chan 提交者: GitHub

support set cuda_arch_name in pipeline (#42498)

* set auto to reduce core_avx/noavx.pyd size

* set CUDA_ARCH_NAME in each case
上级 8c1b2fa6
...@@ -57,7 +57,6 @@ rem ------initialize common variable------ ...@@ -57,7 +57,6 @@ rem ------initialize common variable------
if not defined GENERATOR set GENERATOR="Visual Studio 15 2017 Win64" if not defined GENERATOR set GENERATOR="Visual Studio 15 2017 Win64"
if not defined WITH_TENSORRT set WITH_TENSORRT=ON if not defined WITH_TENSORRT set WITH_TENSORRT=ON
if not defined TENSORRT_ROOT set TENSORRT_ROOT=D:/TensorRT 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_GPU set WITH_GPU=ON
if not defined WITH_MKL set WITH_MKL=ON if not defined WITH_MKL set WITH_MKL=ON
if not defined WITH_AVX set WITH_AVX=ON if not defined WITH_AVX set WITH_AVX=ON
...@@ -229,6 +228,7 @@ set MSVC_STATIC_CRT=OFF ...@@ -229,6 +228,7 @@ set MSVC_STATIC_CRT=OFF
set ON_INFER=OFF set ON_INFER=OFF
set WITH_TENSORRT=ON set WITH_TENSORRT=ON
set WITH_INFERENCE_API_TEST=OFF set WITH_INFERENCE_API_TEST=OFF
if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -243,6 +243,7 @@ set WITH_GPU=OFF ...@@ -243,6 +243,7 @@ set WITH_GPU=OFF
set WITH_AVX=OFF set WITH_AVX=OFF
set MSVC_STATIC_CRT=ON set MSVC_STATIC_CRT=ON
set ON_INFER=OFF set ON_INFER=OFF
if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -260,6 +261,7 @@ set ON_INFER=ON ...@@ -260,6 +261,7 @@ set ON_INFER=ON
set WITH_TENSORRT=ON set WITH_TENSORRT=ON
set WITH_INFERENCE_API_TEST=ON set WITH_INFERENCE_API_TEST=ON
set WITH_ONNXRUNTIME=ON set WITH_ONNXRUNTIME=ON
if not defined CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -274,7 +276,7 @@ rem ------Build windows avx whl package------ ...@@ -274,7 +276,7 @@ rem ------Build windows avx whl package------
:CASE_build_avx_whl :CASE_build_avx_whl
set WITH_AVX=ON set WITH_AVX=ON
set ON_INFER=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 :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -285,7 +287,7 @@ rem ------Build windows no-avx whl package------ ...@@ -285,7 +287,7 @@ rem ------Build windows no-avx whl package------
:CASE_build_no_avx_whl :CASE_build_no_avx_whl
set WITH_AVX=OFF set WITH_AVX=OFF
set ON_INFER=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 :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -296,7 +298,8 @@ rem ------Build windows inference library------ ...@@ -296,7 +298,8 @@ rem ------Build windows inference library------
:CASE_build_inference_lib :CASE_build_inference_lib
set ON_INFER=ON set ON_INFER=ON
set WITH_PYTHON=OFF 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 python %work_dir%\tools\remove_grad_op_and_kernel.py
if %errorlevel% NEQ 0 exit /b 1 if %errorlevel% NEQ 0 exit /b 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册