Commits


Yi Zhang authored and GitHub committed 698e9f71cd7
Improve cache hit rate in windows build (#15538) ### Description 1. Update /Zi to /Z7 in abseil project while using cache 2. Skip target_precompile_headers while using cache ### Motivation and Context There're about 1/4 uncacheable calls in Windows GPU compilation with cache. ``` Uncacheable calls: 441 / 1641 (26.87%) Could not use precompiled header: 361 / 441 (81.86%) Preprocessing failed: 1 / 441 ( 0.23%) Unsupported compiler option: 79 / 441 (17.91%) ``` https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=961916&view=logs&j=5076e696-f193-5f12-2d8a-703dda41a79b&t=9b927034-e3ef-5e25-c6df-387bc37acd63&l=21 The root cause of `Unsupported compiler option` is that /Zi in Abseil isn't updated to /Z7. The root cause of `Could not use precompiled header` is the `target_precompile_headers` creates cmake_pch.pch every time and it's hash value is changed too. ### Result It could reduce compilation time by another 20%. For example: It took 16m43 in CUDA training compilation on Windows. It takes 13m32 after the change. https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=964002&view=logs&s=959c6b43-5937-53e5-5f36-e53cb0249117 ### N.B. In winml project, it's using own target_precompile**d**_header https://github.com/microsoft/onnxruntime/blob/main/cmake/precompiled_header.cmake. Just let it be.