mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
mkl: include Intel's libiomp.so in the MKL RPM unpack
Since Intel's default openmp implementation is available in the same src tarball, we can just include it in the package. This means that `mkl` now "just works" without any environment variables, fragile setup-hooks, or forced propagation. Since the openmp implementation is only needed at runtime (and for test cases), users can substitute a different one if they prefer by exporting it with `LD_PRELOAD`, which is how Intel recommends handling this. If they do not do so, `libiomp.so` lives next to `libmkl_rt.so` and thus will be in the RPATH as a sane default. Since this still comes from the same src tarball, we can ship it without losing the fixed-output derivation; likewise, since Hydra is not building or caching these, shipping these proprietary packages costs no bandwidth for the nix community.
This commit is contained in:
parent
65dfc2b272
commit
6206a342e0
4 changed files with 25 additions and 30 deletions
|
@ -1104,7 +1104,7 @@ on `numpy` will be built with `mkl`.
|
|||
The following is an overlay that configures `numpy` to use `mkl`:
|
||||
```nix
|
||||
self: super: {
|
||||
python36 = super.python36.override {
|
||||
python37 = super.python37.override {
|
||||
packageOverrides = python-self: python-super: {
|
||||
numpy = python-super.numpy.override {
|
||||
blas = super.pkgs.mkl;
|
||||
|
@ -1114,6 +1114,15 @@ self: super: {
|
|||
}
|
||||
```
|
||||
|
||||
`mkl` requires an `openmp` implementation when running with multiple processors.
|
||||
By default, `mkl` will use Intel's `iomp` implementation if no other is
|
||||
specified, but this is a runtime-only dependency and binary compatible with the
|
||||
LLVM implementation. To use that one instead, Intel recommends users set it with
|
||||
`LD_PRELOAD`.
|
||||
|
||||
Note that `mkl` is only available on `x86_64-{linux,darwin}` platforms;
|
||||
moreover, Hydra is not building and distributing pre-compiled binaries using it.
|
||||
|
||||
## Contributing
|
||||
|
||||
### Contributing guidelines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue