clear cache stat. after building (#15439)

### Description
Add  `ccache -z` after every building.


### Motivation and Context
Uploaded Cache stat shouldn't include cache stat.
This commit is contained in:
Yi Zhang 2023-04-10 13:56:55 +08:00 committed by GitHub
parent 6d126f8996
commit 0ea965c541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 10 deletions

View file

@ -84,7 +84,8 @@ stages:
--enable_transformers_tool_test \
--use_cache \
--build_java --build_nodejs --update --build --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON; \
ccache -s"
ccache -sv; \
ccache -z"
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2

View file

@ -70,7 +70,6 @@ jobs:
onnxruntimecpubuildaten \
/bin/bash -c "
set -ex; \
ccache -z; \
ccache -s; \
/opt/python/cp38-cp38/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
@ -82,7 +81,8 @@ jobs:
--skip_tests \
--cmake_extra_defines onnxruntime_ENABLE_ATEN=ON \
--use_cache; \
ccache -s"
ccache -sv; \
ccache -z"
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2

View file

@ -78,7 +78,8 @@ jobs:
--enable_pybind --build_java \
--use_cache \
--cmake_extra_defines CMAKE_CUDA_HOST_COMPILER=/opt/rh/devtoolset-11/root/usr/bin/cc CMAKE_CUDA_ARCHITECTURES=75; \
ccache -s"
ccache -sv; \
ccache -z"
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2

View file

@ -27,7 +27,7 @@ jobs:
displayName: Install protobuf
- script: |
ccache -s
ccache -sv
ccache -z
displayName: Show Cache stats and Clear protolbuf stats
@ -65,6 +65,6 @@ jobs:
CCACHE_SLOPPINESS: modules
- script: |
ccache -s
ccache -sv
ccache -z
displayName: Show Cache stats

View file

@ -82,7 +82,8 @@ jobs:
--enable_training \
--use_cache \
--build_java --build_nodejs --update --build; \
ccache -s"
ccache -sv; \
ccache -z"
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2
@ -133,4 +134,4 @@ jobs:
testResultsFiles: '**/*.results.xml'
searchFolder: '$(Build.BinariesDirectory)'
testRunTitle: 'Unit Test Run'
condition: succeededOrFailed()
condition: succeededOrFailed()

View file

@ -64,7 +64,7 @@ jobs:
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Create Cache Dir
- script: ccache -z && ccache -s
- script: ccache -s && ccache -z
displayName: Show Cache Stats Before Building
- task: CmdLine@2
@ -91,7 +91,9 @@ jobs:
--skip_tests
displayName: 'Build onnxruntime'
- script: ccache -s
- script: |
ccache -sv
ccache -z
displayName: Show Cache Stats After Building
- bash: |-