Repository navigation
Dynamic mkl link - #29
Merged
Merged
Conversation
Statically linked MKL wheels bundle third-party binaries (MKL, OpenMP runtime), which have specific redistribution terms. This commit addresses these by: * **Replacing Intel's OpenMP runtime with LLVM's:** `install_llvm_openmp.py` swaps out Intel's `libiomp5` for LLVM's Apache-2.0 licensed equivalent during the build, providing a more permissive license. * **Accurately declaring and bundling licenses:** `finalize_static_wheel.py` strips the `mkl` dependency (now fully static) and injects a combined `License-Expression` (`MIT AND LicenseRef-Intel-ISSL AND Apache-2.0 WITH LLVM-exception`). It also copies relevant license texts and third-party notices into the wheel's `.dist-info/licenses/` directory, as required by their terms. * **Updating documentation:** `README.md` now explicitly details the licensing for prebuilt wheels. This ensures legal compliance for PyPI wheels while maintaining functionality.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #29 +/- ##
==========================================
+ Coverage 85.46% 85.83% +0.37%
==========================================
Files 4 4
Lines 619 614 -5
Branches 78 78
==========================================
- Hits 529 527 -2
+ Misses 62 59 -3
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Meson's lookup for PyPI's `mkl-devel` can be obstructed when `PKG_CONFIG_PATH` is
pre-set (e.g., by `actions/setup-python`). This commit ensures dynamic MKL
linking succeeds by:
* Explicitly unsetting `PKG_CONFIG_PATH` in the CI workflow during package
installation.
* Modifying `meson.build` to detect MKL absence more gracefully and provide
a clearer error message, guiding users to unset `PKG_CONFIG_PATH` or add
the correct path to it.
* Updating a comment in the CI workflow for clarity regarding the macOS MKL
issue.
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.
Static linking the MKL was proving a little problematic for distribution purposes mostly due to the continued openmp runtime library dependency, but also due to the requirements of including the necessary license information. For now the best route is still to just dynamically link to the MKL through the
mklpython package for pypi distributions.We can still provide pre-built wheels however, they just continue to keep the listed mkl dependency. Also, the most recent pkgconfig version has a fix to now work with the PKG_CONFIG_PATH environment variable set, so we can return to that.