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

MacOS build issue with OpenMP #2432

Closed
mthrok opened this issue Jun 1, 2022 · 0 comments
Closed

MacOS build issue with OpenMP #2432

mthrok opened this issue Jun 1, 2022 · 0 comments

Comments

@mthrok
Copy link
Collaborator

mthrok commented Jun 1, 2022

Since around May 12th, the macOS build process stopped working on CI.

https://hud.pytorch.org/pytorch/audio/commit/f5036c7182f43e06ddf12f2b327cafaecf5763cf

Note that the couple of commits made before the issue started were Python changes, so it's unlikely that these commits broke the build process.

The cause is CMake not being able to find OpenMP. This has been working for quite a while.

In #2404, we install libomp from brew and this appeared to work, but the unittest seg-faulted on exact function that uses OpenMP.

https://app.circleci.com/pipelines/github/pytorch/audio/10846/workflows/3ae28b1a-e2a9-46c5-80d5-44aa95aad869/jobs/674356

This has been worked around by disabling OpenMP for macOS in #2431 .

The root cause of why it started is still unknown and not sure if this keeps us from re-enabling OpenMP for macOS.

The underlying issue is that there is no proper/clean way to detect/use the libomp that PyTorch was compiled with.
The following logic is used to enable/disable the OpenMP, but the success seems to depend on if the build environment has the correct/matching libomp that PyToroch used.

_USE_OPENMP = _get_build("USE_OPENMP", True) and "ATen parallel backend: OpenMP" in torch.__config__.parallel_info()

cc @atalman

@mthrok mthrok changed the title MacOS build issues MacOS build issue with OpenMP Jun 1, 2022
@mthrok mthrok closed this as completed Oct 19, 2023
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

No branches or pull requests

1 participant