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

Fix a build issue: /MP was not enabled correctly #19190

Merged
merged 20 commits into from
Jan 29, 2024
Merged

Fix a build issue: /MP was not enabled correctly #19190

merged 20 commits into from
Jan 29, 2024

Conversation

snnn
Copy link
Member

@snnn snnn commented Jan 18, 2024

Description

In PR #19073 I mistunderstood the value of "--parallel". Instead of testing if args.parallel is None or not , I should test the returned value of number_of_parallel_jobs function.

If build.py was invoked without --parallel, then args.parallel equals to 1. Because it is the default value. Then we should not add "/MP". However, the current code adds it. Because if args.paralllel is evaluated to if 1 , which is True.
If build.py was invoked with --parallel with additional numbers, then args.parallel equals to 0. Because it is unspecified. Then we should add "/MP". However, the current code does not add it. Because if args.paralllel is evaluated to if 0 , which is False.

Motivation and Context

This change also solves the issue in #19606 .

@snnn snnn requested a review from a team January 18, 2024 01:19
tools/ci_build/build.py Outdated Show resolved Hide resolved
tools/ci_build/build.py Outdated Show resolved Hide resolved
@snnn
Copy link
Member Author

snnn commented Jan 24, 2024

Waiting #19254

@snnn snnn requested a review from edgchen1 January 25, 2024 17:17
tools/ci_build/build.py Outdated Show resolved Hide resolved
tools/ci_build/build.py Outdated Show resolved Hide resolved
@snnn snnn merged commit e91d91a into main Jan 29, 2024
287 of 296 checks passed
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.

[Build] build of ORT 1.17.0 fails with "gcc: error: unrecognized command line option ‘-fcf-protection’
3 participants