未验证 提交 39556a44 编写于 作者: Z Zhou Wei 提交者: GitHub

polish windows ci (#32964)

上级 34c95eaf
...@@ -101,8 +101,11 @@ ADD_DEPENDENCIES(mkldnn ${MKLDNN_PROJECT}) ...@@ -101,8 +101,11 @@ ADD_DEPENDENCIES(mkldnn ${MKLDNN_PROJECT})
# it can be directly contained in wheel or capi # it can be directly contained in wheel or capi
if(WIN32) if(WIN32)
SET(MKLDNN_SHARED_LIB ${MKLDNN_INSTALL_DIR}/bin/mkldnn.dll) SET(MKLDNN_SHARED_LIB ${MKLDNN_INSTALL_DIR}/bin/mkldnn.dll)
file(TO_NATIVE_PATH ${MKLDNN_INSTALL_DIR} NATIVE_MKLDNN_INSTALL_DIR)
file(TO_NATIVE_PATH ${MKLDNN_SHARED_LIB} NATIVE_MKLDNN_SHARED_LIB)
ADD_CUSTOM_COMMAND(TARGET ${MKLDNN_PROJECT} POST_BUILD ADD_CUSTOM_COMMAND(TARGET ${MKLDNN_PROJECT} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${MKLDNN_INSTALL_DIR}/bin/dnnl.dll ${MKLDNN_SHARED_LIB}) COMMAND (copy ${NATIVE_MKLDNN_INSTALL_DIR}\\bin\\dnnl.dll ${NATIVE_MKLDNN_SHARED_LIB} /Y))
add_custom_command(TARGET ${MKLDNN_PROJECT} POST_BUILD VERBATIM add_custom_command(TARGET ${MKLDNN_PROJECT} POST_BUILD VERBATIM
COMMAND dumpbin /exports ${MKLDNN_INSTALL_DIR}/bin/mkldnn.dll > ${MKLDNN_INSTALL_DIR}/bin/exports.txt) COMMAND dumpbin /exports ${MKLDNN_INSTALL_DIR}/bin/mkldnn.dll > ${MKLDNN_INSTALL_DIR}/bin/exports.txt)
add_custom_command(TARGET ${MKLDNN_PROJECT} POST_BUILD VERBATIM add_custom_command(TARGET ${MKLDNN_PROJECT} POST_BUILD VERBATIM
......
...@@ -72,8 +72,12 @@ if(WITH_GPU) ...@@ -72,8 +72,12 @@ if(WITH_GPU)
if(NOT WIN32) if(NOT WIN32)
set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library") set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library")
else() else()
if(CUDA_LIB STREQUAL "") if(NOT DEFINED CUDA_LIB)
set(CUDA_LIB "C:\\Program\ Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\lib\\x64") if(DEFINED ENV{CUDA_PATH})
set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64")
else()
set(CUDA_LIB "C:\\Program\ Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\lib\\x64")
endif()
endif() endif()
endif(NOT WIN32) endif(NOT WIN32)
endif() endif()
......
...@@ -85,7 +85,7 @@ for WITH_STATIC_LIB in ON OFF; do ...@@ -85,7 +85,7 @@ for WITH_STATIC_LIB in ON OFF; do
if [ $(echo `uname` | grep "Win") != "" ]; then if [ $(echo `uname` | grep "Win") != "" ]; then
# TODO(wilber, T8T9): Do we still need to support windows gpu static library # TODO(wilber, T8T9): Do we still need to support windows gpu static library
if [ $TEST_GPU_CPU == ON ] && [ $WITH_STATIC_LIB == ON ]; then if [ $TEST_GPU_CPU == ON ] && [ $WITH_STATIC_LIB == ON ]; then
return 0 continue
fi fi
# -----simple_on_word2vec on windows----- # -----simple_on_word2vec on windows-----
cmake .. -G "Visual Studio 15 2017" -A x64 -T host=x64 -DPADDLE_LIB=${inference_install_dir} \ cmake .. -G "Visual Studio 15 2017" -A x64 -T host=x64 -DPADDLE_LIB=${inference_install_dir} \
......
...@@ -142,7 +142,7 @@ if(WITH_PYTHON) ...@@ -142,7 +142,7 @@ if(WITH_PYTHON)
"${op_function_generator_path}\\op_function_generator.exe ${tmp_impl_file}\n" "${op_function_generator_path}\\op_function_generator.exe ${tmp_impl_file}\n"
"if %ERRORLEVEL% NEQ 0 (\n" "if %ERRORLEVEL% NEQ 0 (\n"
" set /a build_times=%build_times%+1\n" " set /a build_times=%build_times%+1\n"
" if %build_times% GEQ 3 (\n" " if %build_times% GEQ 10 (\n"
" exit /b 1\n" " exit /b 1\n"
" ) else (\n" " ) else (\n"
" goto :retry\n" " goto :retry\n"
......
...@@ -161,6 +161,7 @@ set WITH_MKL=ON ...@@ -161,6 +161,7 @@ set WITH_MKL=ON
set WITH_GPU=ON set WITH_GPU=ON
set WITH_AVX=ON set WITH_AVX=ON
set MSVC_STATIC_CRT=OFF set MSVC_STATIC_CRT=OFF
set ON_INFER=ON
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -177,12 +178,13 @@ set WITH_GPU=OFF ...@@ -177,12 +178,13 @@ set WITH_GPU=OFF
set WITH_AVX=OFF set WITH_AVX=OFF
set MSVC_STATIC_CRT=ON set MSVC_STATIC_CRT=ON
set retry_times=1 set retry_times=1
set ON_INFER=OFF
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
call :test_whl_pacakage || goto test_whl_pacakage_error call :test_whl_pacakage || goto test_whl_pacakage_error
call :test_unit || goto test_unit_error call :test_unit || goto test_unit_error
call :test_inference || goto test_inference_error :: call :test_inference || goto test_inference_error
:: call :check_change_of_unittest || goto check_change_of_unittest_error :: call :check_change_of_unittest || goto check_change_of_unittest_error
goto:success goto:success
...@@ -191,7 +193,7 @@ rem ------Build windows avx whl package------ ...@@ -191,7 +193,7 @@ rem ------Build windows avx whl package------
set WITH_AVX=ON set WITH_AVX=ON
set ON_INFER=OFF set ON_INFER=OFF
set CUDA_ARCH_NAME=All set CUDA_ARCH_NAME=All
set retry_times=4 set retry_times=3
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -203,7 +205,7 @@ rem ------Build windows no-avx whl package------ ...@@ -203,7 +205,7 @@ rem ------Build windows no-avx whl package------
set WITH_AVX=OFF set WITH_AVX=OFF
set ON_INFER=OFF set ON_INFER=OFF
set CUDA_ARCH_NAME=All set CUDA_ARCH_NAME=All
set retry_times=4 set retry_times=3
call :cmake || goto cmake_error call :cmake || goto cmake_error
call :build || goto build_error call :build || goto build_error
...@@ -265,7 +267,7 @@ if "%WITH_GPU%"=="ON" ( ...@@ -265,7 +267,7 @@ if "%WITH_GPU%"=="ON" (
) )
rem ------initialize the python environment------ rem ------initialize the python environment------
@ECHO ON @ECHO OFF
set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
set PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH% set PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%
if "%WITH_PYTHON%" == "ON" ( if "%WITH_PYTHON%" == "ON" (
...@@ -420,7 +422,7 @@ if %GENERATOR% == "Ninja" ( ...@@ -420,7 +422,7 @@ if %GENERATOR% == "Ninja" (
ninja all ninja all
) else ( ) else (
if "%WITH_CLCACHE%"=="OFF" ( if "%WITH_CLCACHE%"=="OFF" (
MSBuild /m:%PARALLEL_PROJECT_COUNT% /p:PreferredToolArchitecture=x64 /p:Configuration=Release /verbosity:%LOG_LEVEL% ALL_BUILD.vcxproj MSBuild /m:%PARALLEL_PROJECT_COUNT% /p:PreferredToolArchitecture=x64 /p:TrackFileAccess=false /p:Configuration=Release /verbosity:%LOG_LEVEL% ALL_BUILD.vcxproj
) else ( ) else (
MSBuild /m:%PARALLEL_PROJECT_COUNT% /p:PreferredToolArchitecture=x64 /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=%PYTHON_ROOT%\Scripts /p:Configuration=Release /verbosity:%LOG_LEVEL% ALL_BUILD.vcxproj MSBuild /m:%PARALLEL_PROJECT_COUNT% /p:PreferredToolArchitecture=x64 /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=%PYTHON_ROOT%\Scripts /p:Configuration=Release /verbosity:%LOG_LEVEL% ALL_BUILD.vcxproj
) )
...@@ -648,12 +650,12 @@ echo git fetch upstream $BRANCH # develop is not fetched>> check_change_of_ ...@@ -648,12 +650,12 @@ echo git fetch upstream $BRANCH # develop is not fetched>> check_change_of_
echo fi>> check_change_of_unittest.sh echo fi>> check_change_of_unittest.sh
echo git checkout -b origin_pr >> check_change_of_unittest.sh echo git checkout -b origin_pr >> check_change_of_unittest.sh
echo git checkout -f $BRANCH >> check_change_of_unittest.sh echo git checkout -f $BRANCH >> check_change_of_unittest.sh
echo cmake .. -G %GENERATOR% -DWITH_AVX=%WITH_AVX% -DWITH_GPU=%WITH_GPU% -DWITH_MKL=%WITH_MKL% ^ echo cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=Release -DWITH_AVX=%WITH_AVX% -DWITH_GPU=%WITH_GPU% -DWITH_MKL=%WITH_MKL% ^
-DWITH_TESTING=%WITH_TESTING% -DWITH_PYTHON=%WITH_PYTHON% -DPYTHON_EXECUTABLE=%PYTHON_EXECUTABLE% -DON_INFER=%ON_INFER% ^ -DWITH_TESTING=%WITH_TESTING% -DWITH_PYTHON=%WITH_PYTHON% -DON_INFER=%ON_INFER% ^
-DWITH_INFERENCE_API_TEST=%WITH_INFERENCE_API_TEST% -DTHIRD_PARTY_PATH=%THIRD_PARTY_PATH% ^ -DWITH_INFERENCE_API_TEST=%WITH_INFERENCE_API_TEST% -DTHIRD_PARTY_PATH=%THIRD_PARTY_PATH% ^
-DINFERENCE_DEMO_INSTALL_DIR=%INFERENCE_DEMO_INSTALL_DIR% -DWITH_STATIC_LIB=%WITH_STATIC_LIB% ^ -DINFERENCE_DEMO_INSTALL_DIR=%INFERENCE_DEMO_INSTALL_DIR% -DWITH_STATIC_LIB=%WITH_STATIC_LIB% ^
-DWITH_TENSORRT=%WITH_TENSORRT% -DTENSORRT_ROOT=%TENSORRT_ROOT% -DMSVC_STATIC_CRT=%MSVC_STATIC_CRT% ^ -DWITH_TENSORRT=%WITH_TENSORRT% -DTENSORRT_ROOT="%TENSORRT_ROOT%" -DMSVC_STATIC_CRT=%MSVC_STATIC_CRT% ^
-DWITH_UNITY_BUILD=%WITH_UNITY_BUILD% >> check_change_of_unittest.sh -DWITH_UNITY_BUILD=%WITH_UNITY_BUILD% -DCUDA_ARCH_NAME=%CUDA_ARCH_NAME% >> check_change_of_unittest.sh
echo cat ^<^<EOF>> check_change_of_unittest.sh echo cat ^<^<EOF>> check_change_of_unittest.sh
echo ============================================ >> check_change_of_unittest.sh echo ============================================ >> check_change_of_unittest.sh
echo Generate unit tests.spec of develop. >> check_change_of_unittest.sh echo Generate unit tests.spec of develop. >> check_change_of_unittest.sh
......
...@@ -66,7 +66,7 @@ rm -rf prec_build ...@@ -66,7 +66,7 @@ rm -rf prec_build
if [[ "$SYSTEM" == "Linux" ]] || [[ "$SYSTEM" == "Darwin" ]];then if [[ "$SYSTEM" == "Linux" ]] || [[ "$SYSTEM" == "Darwin" ]];then
rm $PADDLE_ROOT/br-ut $PADDLE_ROOT/pr-ut $PADDLE_ROOT/paddle/scripts/paddle_build_pre.sh rm $PADDLE_ROOT/br-ut $PADDLE_ROOT/pr-ut $PADDLE_ROOT/paddle/scripts/paddle_build_pre.sh
elif [[ "$SYSTEM" == "Windows_NT" ]];then elif [[ "$SYSTEM" == "Windows_NT" ]];then
rm $PADDLE_ROOT/br-ut $PADDLE_ROOT/pr-ut $PADDLE_ROOT/get_added_ut.sh rm $PADDLE_ROOT/br-ut $PADDLE_ROOT/pr-ut $PADDLE_ROOT/win_cmake.sh
fi fi
git checkout -f $CURBRANCH git checkout -f $CURBRANCH
echo $CURBRANCH echo $CURBRANCH
......
...@@ -159,7 +159,6 @@ CPU_PARALLEL_JOB = [ ...@@ -159,7 +159,6 @@ CPU_PARALLEL_JOB = [
'test_matmul_transpose_reshape_fuse_pass', 'test_matmul_transpose_reshape_fuse_pass',
'test_matmul_mkldnn_op', 'test_matmul_mkldnn_op',
'test_matmul_bf16_mkldnn_op', 'test_matmul_bf16_mkldnn_op',
'test_math_op_patch',
'test_match_matrix_tensor_op', 'test_match_matrix_tensor_op',
'test_lookup_table_dequant_op', 'test_lookup_table_dequant_op',
'test_logging_utils', 'test_logging_utils',
...@@ -175,7 +174,6 @@ CPU_PARALLEL_JOB = [ ...@@ -175,7 +174,6 @@ CPU_PARALLEL_JOB = [
'test_layer_norm_mkldnn_op', 'test_layer_norm_mkldnn_op',
'test_layer_norm_bf16_mkldnn_op', 'test_layer_norm_bf16_mkldnn_op',
'test_layer', 'test_layer',
'test_lambv2_op',
'test_is_test_pass', 'test_is_test_pass',
'test_ir_skip_layernorm_pass', 'test_ir_skip_layernorm_pass',
'test_ir_graph', 'test_ir_graph',
...@@ -657,6 +655,8 @@ TETRAD_PARALLEL_JOB = [ ...@@ -657,6 +655,8 @@ TETRAD_PARALLEL_JOB = [
# It run 2 job each time, If it failed due to Insufficient GPU memory or CUBLAS_STATUS_ALLOC_FAILED, # It run 2 job each time, If it failed due to Insufficient GPU memory or CUBLAS_STATUS_ALLOC_FAILED,
# just remove it from this list. # just remove it from this list.
TWO_PARALLEL_JOB = [ TWO_PARALLEL_JOB = [
'test_lambv2_op',
'test_math_op_patch',
'test_tensor_to_numpy', 'test_tensor_to_numpy',
'zero_copy_tensor_test', 'zero_copy_tensor_test',
'sequence_pooling_test', 'sequence_pooling_test',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册