From 61e51c1834feda1416c7812baa09dc21d9bd02f3 Mon Sep 17 00:00:00 2001 From: Zhou Wei <1183042833@qq.com> Date: Tue, 3 Aug 2021 12:42:17 +0800 Subject: [PATCH] polish sccahce (#34350) --- paddle/fluid/framework/CMakeLists.txt | 2 +- paddle/scripts/paddle_build.bat | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index 485fddff4df..1e4d813c6d3 100644 --- a/paddle/fluid/framework/CMakeLists.txt +++ b/paddle/fluid/framework/CMakeLists.txt @@ -405,7 +405,7 @@ configure_file(commit.h.in commit.h) # Adapt to custom op mechanism: Include the header files related to the data type # to avoid exposing the path of the underlying file include_directories(${PADDLE_SOURCE_DIR}/paddle/fluid/platform) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../extension/include) +include_directories(${PADDLE_SOURCE_DIR}/paddle/fluid/extension/include) if(WITH_ROCM) hip_library(custom_tensor SRCS ../extension/src/ext_tensor.cc DEPS lod_tensor memory enforce) diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index 60c17eae851..3dbffe510df 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -162,6 +162,8 @@ if "%WITH_SCCACHE%"=="ON" ( sccache --stop-server 2> NUL if not exist D:\sccache mkdir D:\sccache set SCCACHE_DIR=D:\sccache\.cache + :: sccache will shut down if a source file takes more than 10 mins to compile + set SCCACHE_IDLE_TIMEOUT=0 set SCCACHE_CACHE_SIZE=30G set SCCACHE_ERROR_LOG=D:\sccache\sccache_log.txt set SCCACHE_LOG=quiet @@ -500,15 +502,6 @@ for /F %%# in ('wmic os get localdatetime^|findstr 20') do set end=%%# set end=%end:~4,10% call :timestamp "%start%" "%end%" "Build" -tree /F %cd%\paddle_inference_install_dir\paddle -%cache_dir%\tools\busybox64.exe du -h -d 0 -k %cd%\paddle_inference_install_dir\paddle\lib > lib_size.txt -set /p libsize=< lib_size.txt -for /F %%i in ("%libsize%") do ( - set /a libsize_m=%%i/1024 - echo "Windows Paddle_Inference Size: !libsize_m!M" - echo ipipe_log_param_Windows_Paddle_Inference_Size: !libsize_m!M -) - %cache_dir%\tools\busybox64.exe du -h -d 0 %cd%\python\dist > whl_size.txt set /p whlsize=< whl_size.txt for /F %%i in ("%whlsize%") do echo "Windows PR whl Size: %%i" @@ -527,7 +520,6 @@ if %ERRORLEVEL% NEQ 0 ( exit /b 1 ) - set CUDA_VISIBLE_DEVICES=0 python %work_dir%\paddle\scripts\installation_validate.py goto:eof @@ -633,6 +625,15 @@ set end=%end:~4,10% call :timestamp "%start%" "%end%" "1 card TestCases Total" call :timestamp "%start%" "%end%" "TestCases Total" +tree /F %cd%\paddle_inference_install_dir\paddle +%cache_dir%\tools\busybox64.exe du -h -d 0 -k %cd%\paddle_inference_install_dir\paddle\lib > lib_size.txt +set /p libsize=< lib_size.txt +for /F %%i in ("%libsize%") do ( + set /a libsize_m=%%i/1024 + echo "Windows Paddle_Inference Size: !libsize_m!M" + echo ipipe_log_param_Windows_Paddle_Inference_Size: !libsize_m!M +) + cd %work_dir%\paddle\fluid\inference\api\demo_ci %cache_dir%\tools\busybox64.exe bash run.sh %work_dir:\=/% %WITH_MKL% %WITH_GPU% %cache_dir:\=/%/inference_demo %TENSORRT_ROOT%/include %TENSORRT_ROOT%/lib %MSVC_STATIC_CRT% goto:eof -- GitLab