From 277b73ab6fecd5c8f76b8eb9cc2fc1e036aee0db Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 18 Oct 2018 15:00:48 -0400 Subject: pythonPackages.{numpy,scipy,numexpr}: support MKL as BLAS This adds support building with MKL. --- doc/languages-frameworks/python.section.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'doc/languages-frameworks') diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index b52b79c62d91..fe02344a72cd 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -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 -- cgit 1.4.1