diff --git a/cmake/generic.cmake b/cmake/generic.cmake index cea65f17fbe836ee5951805dfdf5d3078087ba44..f3d10b57d9f52e12332acc75ea43192b4e5bafb8 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -932,12 +932,8 @@ function(generate_dummy_static_lib) if(NOT dummy_GENERATOR) message(FATAL_ERROR "You must provide a generator file name.") endif() - # if ${dummy_GENERATOR} contains "/", it may be a file path - if(NOT ${dummy_GENERATOR} MATCHES ".*/.*") - set(dummy_GENERATOR "${CMAKE_CURRENT_LIST_DIR}/${dummy_GENERATOR}") - endif() if(NOT dummy_CONTENT) - set(dummy_CONTENT "${dummy_FILE_PATH} for lib ${dummy_LIB_NAME}") + set(dummy_CONTENT "${dummy_LIB_NAME}_dummy.c for lib ${dummy_LIB_NAME}") endif() configure_file(${PROJECT_SOURCE_DIR}/cmake/dummy.c.in ${dummy_FILE_PATH} @ONLY) diff --git a/cmake/unity_build.cmake b/cmake/unity_build.cmake index a0d73f58a540d325b14f38bbde44294bbe8a366a..b7e5564b3a618a73be669b736aa4e9367f4a4f04 100644 --- a/cmake/unity_build.cmake +++ b/cmake/unity_build.cmake @@ -77,11 +77,14 @@ function(compose_unity_target_sources TARGET TYPE) get_property(unity_group_index_max GLOBAL PROPERTY ${TARGET}_${TYPE}_group_index) foreach(src ${ARGN}) set(unity_file "") - # UB use absolute path of source. + # Note(zhouwei25): UB use the path releative to CMAKE_SOURCE_DIR. + # If use absolute path, sccache/ccache hit rate will be reduced. if(IS_ABSOLUTE ${src}) set(src_absolute_path ${src}) + file(RELATIVE_PATH src_relative_path ${CMAKE_SOURCE_DIR} ${src}) else() set(src_absolute_path ${CMAKE_CURRENT_SOURCE_DIR}/${src}) + file(RELATIVE_PATH src_relative_path ${CMAKE_SOURCE_DIR} ${src_absolute_path}) endif() # If `unity_group_index_max` is empty, there is no combination # relationship. @@ -106,7 +109,7 @@ function(compose_unity_target_sources TARGET TYPE) set_property(GLOBAL APPEND PROPERTY ${unity_file_sources} ${UNITY_CU_BEFORE_CODE}) endif() endif() - set_property(GLOBAL APPEND PROPERTY ${unity_file_sources} "#include \"${src_absolute_path}\"") + set_property(GLOBAL APPEND PROPERTY ${unity_file_sources} "#include \"${src_relative_path}\"") set(unity_target_sources ${unity_target_sources} ${unity_file}) break() endif() diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index 62d30a50d6be4d9ff368c87b86cc15f2c838a8ad..33736876dd17d22563b85b5393098c16aecb8a0d 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -154,15 +154,17 @@ dir %cache_dir% dir paddle\fluid\pybind\Release rem -------Caching strategy 1: End -------------------------------- + rem -------Caching strategy 2: sccache decorate compiler----------- if "%WITH_SCCACHE%"=="ON" ( + del D:\sccache\sccache_log.txt cmd /C sccache -V || call :install_sccache sccache --stop-server 2> NUL if not exist D:\sccache mkdir D:\sccache set SCCACHE_DIR=D:\sccache\.cache set SCCACHE_CACHE_SIZE=30G set SCCACHE_ERROR_LOG=D:\sccache\sccache_log.txt - set SCCACHE_LOG=quiet + set SCCACHE_LOG=trace sccache --start-server sccache -z goto :CASE_%1 diff --git a/tools/parallel_UT_rule.py b/tools/parallel_UT_rule.py index fe0be21bfdf44eb3cf843b689c6ac7c57ec5dfed..e6a628ae2fc95fb6bfdd16021295d8291cb8383e 100644 --- a/tools/parallel_UT_rule.py +++ b/tools/parallel_UT_rule.py @@ -674,7 +674,6 @@ TWO_PARALLEL_JOB = [ 'test_fill_op', 'test_slice_op', 'test_cond', - 'test_lstm', 'test_ema', 'test_nan_inf', 'test_isinstance', @@ -810,7 +809,6 @@ TWO_PARALLEL_JOB = [ 'test_embedding_id_stop_gradient', 'test_empty_op', 'test_py_reader_combination', - 'test_ptb_lm', 'test_expand_op', 'test_prroi_pool_op', 'test_fake_dequantize_op',