fix: make OpenMP optional and add macOS wheel builds - #44
Open
f-dy wants to merge 1 commit into
Open
Conversation
- CMakeLists.txt: Auto-detect Homebrew libomp on macOS. If OpenMP is not found, warn and continue without it (graceful degradation). - CI: Add macos-latest to the wheel build matrix with libomp installed, so macOS wheels ship with OpenMP support. On macOS, install libomp for OpenMP support: brew install libomp
f-dy
marked this pull request as ready for review
May 29, 2026 12:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make OpenMP optional so the package can be pip-installed on macOS (where Apple clang does not bundle OpenMP).
Changes
libompon macOS viabrew --prefix libomp. If OpenMP is still not found, warn and continue without it (graceful degradation, matching scikit-learn's approach).macos-latestto the wheel build matrix withbrew install libomp, so published macOS wheels include OpenMP support.For users building from source on macOS
brew install libomp pip install .OpenMP will be auto-detected. Without
libomp, the build succeeds but runs single-threaded.Testing
pip install .succeeds on macOS with and withoutlibompinstalledlibomp: OpenMP is detected and enabledlibomp: warning printed, build continues without OpenMP