Better safeguard on unloadable MKL#793
Merged
ChrisRackauckas merged 2 commits intomainfrom Oct 3, 2025
Merged
Conversation
Tries to safeguard julia-actions/setup-julia#300 JuliaLang/julia#55878 where the user has requested an incorrect architecture and thus we may believe we can load MKL until we check `MKL_jll.is_available() == false`. The reason is because we're being lied to about `@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686` which then makes it take this branch and then MKL does not exist. We could instead check `isapple` another type of workaround here and 99% of users would be perfectly fine, but if this is safe this is slightly better for the 1 remaining Intel Apple user that exists in the wild somewhere.
| end | ||
|
|
||
| @static if usemkl | ||
| using MKL_jll: libmkl_rt |
Contributor
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
Suggested change
| using MKL_jll: libmkl_rt | |
| using MKL_jll: libmkl_rt |
| @static if usemkl | ||
| using MKL_jll: libmkl_rt | ||
| else | ||
| global libmkl_rt |
Contributor
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
Suggested change
| global libmkl_rt | |
| global libmkl_rt |
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.
Tries to safeguard julia-actions/setup-julia#300 JuliaLang/julia#55878 where the user has requested an incorrect architecture and thus we may believe we can load MKL until we check
MKL_jll.is_available() == false. The reason is because we're being lied to about@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686which then makes it take this branch and then MKL does not exist. We could instead checkisappleanother type of workaround here and 99% of users would be perfectly fine, but if this is safe this is slightly better for the 1 remaining Intel Apple user that exists in the wild somewhere.