Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 3fe18a5b4ec0
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: cdfda4b455d0
Choose a head ref
  • 9 commits
  • 80 files changed
  • 2 contributors

Commits on Apr 17, 2020

  1. Copy the full SHA
    90326ba View commit details
    Browse the repository at this point in the history
  2. blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider

    This is based on previous work for switching between BLAS and LAPACK
    implementation in Debian[1] and Gentoo[2]. The goal is to have one way
    to depend on the BLAS/LAPACK libraries that all packages must use. The
    attrs “blas” and “lapack” are used to represent a wrapped BLAS/LAPACK
    provider. Derivations that don’t care how BLAS and LAPACK are
    implemented can just use blas and lapack directly. If you do care what
    you get (perhaps for some CPP), you should verify that blas and lapack
    match what you expect with an assertion.
    
    The “blas” package collides with the old “blas” reference
    implementation. This has been renamed to “blas-reference”. In
    addition, “lapack-reference” is also included, corresponding to
    “liblapack” from Netlib.org.
    
    Currently, there are 3 providers of the BLAS and LAPACK interfaces:
    
    - lapack-reference: the BLAS/LAPACK implementation maintained by netlib.org
    - OpenBLAS: an optimized version of BLAS and LAPACK
    - MKL: Intel’s unfree but highly optimized BLAS/LAPACK implementation
    
    By default, the above implementations all use the “LP64” BLAS and
    LAPACK ABI. This corresponds to “openblasCompat” and is the safest way
    to use BLAS/LAPACK. You may received some benefits from “ILP64” or
    8-byte integer BLAS at the expense of breaking compatibility with some
    packages.
    
    This can be switched at build time with an override like:
    
        import <nixpkgs> {
            config.allowUnfree = true;
            overlays = [(self: super: {
              lapack = super.lapack.override {
                lapackProvider = super.lapack-reference;
              };
              blas = super.blas.override {
                blasProvider = super.lapack-reference;
              };
            })];
          }
    
    or, switched at runtime via LD_LIBRARY_PATH like:
    
        $ LD_LIBRARY_PATH=$(nix-build -E '(with import <nixpkgs> {}).lapack.override { lapackProvider = pkgs.mkl; is64bit = true; })')/lib:$(nix-build -E '(with import <nixpkgs> {}).blas.override { blasProvider = pkgs.mkl; is64bit = true; })')/lib ./your-blas-linked-binary
    
    By default, we use OpenBLAS LP64 also known in Nixpkgs as
    openblasCompat.
    
    [1]: https://wiki.debian.org/DebianScience/LinearAlgebraLibraries
    [2]: https://wiki.gentoo.org/wiki/Blas-lapack-switch
    matthewbauer committed Apr 17, 2020
    Copy the full SHA
    4387335 View commit details
    Browse the repository at this point in the history
  3. treewide: use blas and lapack

    This makes packages use lapack and blas, which can wrap different
    BLAS/LAPACK implementations.
    
    treewide: cleanup from blas/lapack changes
    
    A few issues in the original treewide:
    
    - can’t assume blas64 is a bool
    - unused commented code
    matthewbauer committed Apr 17, 2020
    Copy the full SHA
    1c8aba8 View commit details
    Browse the repository at this point in the history
  4. pkgs/release-alternatives.nix: create

    Add some ability to test the different BLAS/LAPACK implementations
    together.
    matthewbauer committed Apr 17, 2020
    Copy the full SHA
    7841b42 View commit details
    Browse the repository at this point in the history
  5. setup-hooks/audit-blas.sh: init

    Add a simple hook that makes sure blas and lapack are linked to the
    right place.
    matthewbauer committed Apr 17, 2020
    Copy the full SHA
    d83e9c9 View commit details
    Browse the repository at this point in the history
  6. arrayfire: remove mkl

    This is unfree.
    matthewbauer committed Apr 17, 2020
    Copy the full SHA
    98fb0ed View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    fcf33e2 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    97fc083 View commit details
    Browse the repository at this point in the history
  9. Merge pull request #83888 from matthewbauer/blas-alternatives

    Add BLAS/LAPACK switching mechanism
    Ericson2314 committed Apr 17, 2020
    Copy the full SHA
    cdfda4b View commit details
    Browse the repository at this point in the history