-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add mkl_path preference to support using "system" MKL #84
base: master
Are you sure you want to change the base?
Conversation
Would be great if someone could approve CI for this to test 1.6 behavior (which hopefully shouldn't have been effected) etc. |
I included the comments and, in particular, dropped support for Julia versions < 1.6. I also adjusted the CI accordingly. |
Still need to check that 1.6 (no LBT) still works but maybe CI can try that for me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me!
The 1.6 CI runners seem to fail for different reasons...? |
It looks to me like it's failing because it can't find the |
Gentle bump. Looks like julia v1.6 support is the holdup here. Since |
Gentle bump @carstenbauer |
Co-authored-by: Elliot Saba <[email protected]>
Co-authored-by: Elliot Saba <[email protected]>
Alright, I've resurrected this PR. Should be close to the finish line now (it works fine for me locally). Let's see if CI fails (but it seems to be broken anyways 😞). I've dropped the environment variable option as the preference option is generally superior. Let's see if we get complaints. The only thing I'm not super sure about is |
You don't need to add a preference for this, because LBT automatically figures out the interface through the magic of scary calling convention hacks. |
Kind bump. |
From a code POV, the PR can be merged. I don't know why CI is failing on Windows/macOS though. For Windows, there are lots of these errors
which I don't think originate from this PR. For macOS, we have three numerical test errors. Again, I don't see how this could be related to the changes in this PR. |
@carstenbauer Please rebase and merge if you think this is good. We have disabled macOS CI anyways, since it is now unsupported and agree it shouldn't hold it back. Do you have commit access to this repo? |
Addressing #82, this PR adds the option to use a "system" MKL, i.e. an external
libmkl_rt
, instead of the one provided by MKL_jll.jl.Specifically, a user may specify a
mkl_path
via a preference,or the environment variable. Supported are the valuesJULIA_MKL_PROVIDER
mkl_jll
(default) andsystem
. Ifsystem
is chosen, we check thatlibmkl_rt
is available on the linker search path, i.e.Libdl.find_library
is able to find it, or otherwise throw an error. The user may also specify the path tolibmkl_rt
explicitly,eitherviathe environment variablethe preferenceJULIA_MKL_PATH
ormkl_path
. The functionset_mkl_path
can be used to change the MKL provider preference (it retriggers compilation in contrast to changing the environment variable, which won't have any effect).Note that with this PR we only call
using MKL_jll
if it is really needed. Combined with the laziness of the MKL_jll artifact this ensures that the ~1.5 GB (on linux) MKL dependency is only downloaded ifmkl_path = "mkl_jll"
(default) but not whenmkl_path = "system"
.Credit: This PR is largely inspired by a draft implementation by @staticfloat which originated out of a Slack discussion.
TODOs (OLD):
Check that Julia 1.6 (no LBT) still works correctlyCloses #82