Skip to content

fix: linking openMP on mac #20

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

Merged
merged 10 commits into from
Jun 2, 2025
Merged

fix: linking openMP on mac #20

merged 10 commits into from
Jun 2, 2025

Conversation

yoyolicoris
Copy link
Member

No description provided.

@yoyolicoris yoyolicoris marked this pull request as draft January 31, 2025 11:23
@yoyolicoris yoyolicoris marked this pull request as ready for review June 2, 2025 22:46
@yoyolicoris
Copy link
Member Author

After trial and error, only the arm mac GitHub runners are buildable...

@yoyolicoris yoyolicoris requested a review from Copilot June 2, 2025 22:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes OpenMP linking issues on macOS and updates the CI workflow to accommodate the change.

  • Update the OpenMP linking flag in setup.py and remove redundant extra_* initializations.
  • Modify the GitHub Actions workflow to install libomp on macOS and adjust torch installation and CPP extension build commands.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
setup.py Updated OpenMP linking flag from "-lgomp" to "-fopenmp" and removed redundant globals.
.github/workflows/python-package.yml Updated OS matrix, added libomp installation, and separated torch install/build steps for macOS and Ubuntu.
Comments suppressed due to low confidence (1)

setup.py:37

  • Replacing '-lgomp' with '-fopenmp' is appropriate for clang with libomp on macOS, but ensure this flag is compatible with all intended compiler environments.
extra_link_args.append("-fopenmp")

@yoyolicoris yoyolicoris merged commit 7ed8aa5 into main Jun 2, 2025
10 checks passed
@yoyolicoris yoyolicoris deleted the fix-mac-build branch June 2, 2025 22:49
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.

1 participant