-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Prioritize building with libgomp over libomp #138834
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/138834
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 1 Unrelated FailureAs of commit c674810 with merge base e802b29 ( NEW FAILURES - The following jobs have failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
@malfet @mingfeima Could I get a review or merge on this? |
@mwlon in principle this change looks good to me, but can you please add a few more references to what is libomp (llvm's OpenMP runtime I guess) and why gomp is preferable, when available Last but not least, what are the performance implications? |
@malfet I added the comments. As for performance:
|
@malfet I don't believe I have permissions to merge this. Do you want to? |
@malfet @mingfeima ping |
@pytorchbot merge |
Pull workflow has not been scheduled for the PR yet. It could be because author doesn't have permissions to run those or skip-checks keywords were added to PR/commits, aborting merge. Please get/give approval for the workflows and/or remove skip ci decorators before next merge attempt. If you think this is a mistake, please contact PyTorch Dev Infra. |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
12f0a82
to
887c40b
Compare
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
Thanks for the PR @mwlon. I would like to link to another issue (#136307) which is currently under investigation. While this issue may not be directly related to your fix, it relates to a potential conflict between the omp/gomp and iomp. Specifically, if PyTorch is built with libgomp and libiomp is preloaded at runtime, below script fails to run with certain numactl commands:
|
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
887c40b
to
8c43093
Compare
This Job: |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Not stale In fact it looks like we are still waiting for action from maintainers |
@pytorchbot rebase -b main |
@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here |
Successfully rebased |
8c43093
to
c674810
Compare
@pytorchmergebot merge -i |
Merge startedYour change will be merged while ignoring the following 0 checks: Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: Apply lint suggestions Details for Dev Infra teamRaised by workflow job |
Fixes #126211
The approach I'm taking here is simply to prioritize gomp over omp, if it is available. Here's how this should affect possible build scenarios:
** old behavior: uses omp
** new behavior: uses gomp
** old behavior: unsafely links in both gomp+omp
** new behavior: uses only gomp
The pytorch distributions have always only linked to gomp, so I assume they're built on a machine without libomp. I've verified on my own machine that this build avoids linking to libomp.