Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak Windows build parallelization settings #19664

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

skottmckay
Copy link
Contributor

Description

Use UseMultiToolTask and limit the number of cl.exe instances running.

MultiToolTask info: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/

Info on why limiting CL_MPCount can help: https://github.com/Microsoft/checkedc-clang/wiki/Parallel-builds-of-clang-on-Windows

The current CIs have 4 cores (both physical and logical). Hardcoded the GPU build in win-ci.yml to use CL_MPCount of 2 as that seems to work fine. Can adjust if needed to base it on the actual number of cores or to use build.py to build.

Caveat: I've run about 16 builds and haven't seen a slow build yet, but as the root cause of the slow builds isn't really known this isn't guaranteed to be a fix.

Motivation and Context

Try and prevent super slow GPU builds by reducing number of tasks potentially running in parallel.

… slow GPU builds by reducing number of tasks potentially running in parallel.
@skottmckay skottmckay requested a review from a team as a code owner February 27, 2024 05:32
tools/ci_build/build.py Fixed Show fixed Hide fixed
tools/ci_build/build.py Fixed Show fixed Hide fixed
Copy link
Member

@snnn snnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@snnn snnn merged commit 580ee20 into main Feb 27, 2024
95 checks passed
@snnn snnn deleted the skottmckay/TweakWindowsBuildParallelizationOptions branch February 27, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants