pythonPackages.{numpy,scipy,numexpr}: support MKL as BLAS

This adds support building with MKL.
This commit is contained in:
Chris Ostrouchov
2018-10-18 15:00:48 -04:00
committed by Frederik Rietdijk
parent eee82aee37
commit 277b73ab6f
4 changed files with 53 additions and 16 deletions

View File

@@ -1079,8 +1079,7 @@ To modify only a Python package set instead of a whole Python derivation, use th
Use the following overlay template:
```nix
self: super:
{
self: super: {
python = super.python.override {
packageOverrides = python-self: python-super: {
zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
@@ -1095,6 +1094,25 @@ self: super:
}
```
### How to use Intel's MKL with numpy and scipy?
A `site.cfg` is created that configures BLAS based on the `blas` parameter
of the `numpy` derivation. By passing in `mkl`, `numpy` and packages depending
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 {
packageOverrides = python-self: python-super: {
numpy = python-super.numpy.override {
blas = super.pkgs.mkl;
};
};
};
}
```
## Contributing
### Contributing guidelines