2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, fetchFromGitHub, coreutils, gfortran, gnused
|
2020-11-24 20:58:05 +00:00
|
|
|
, python3, util-linux, which
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
, enableStatic ? false
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.16.1";
|
2020-05-29 06:06:01 +00:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "libxsmm";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfp";
|
|
|
|
repo = "libxsmm";
|
2020-09-25 04:45:31 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1c1qj6hcdfx11bvilnly92vgk1niisd2bjw1s8vfyi2f7ws1wnp0";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [
|
2020-05-29 06:06:01 +00:00
|
|
|
coreutils
|
2020-09-25 04:45:31 +00:00
|
|
|
gfortran
|
2020-05-29 06:06:01 +00:00
|
|
|
gnused
|
2020-09-25 04:45:31 +00:00
|
|
|
python3
|
2020-11-24 20:58:05 +00:00
|
|
|
util-linux
|
2020-05-29 06:06:01 +00:00
|
|
|
which
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
makeFlags = let
|
|
|
|
static = if enableStatic then "1" else "0";
|
|
|
|
in [
|
|
|
|
"OMP=1"
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"STATIC=${static}"
|
|
|
|
];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://github.com/hfp/libxsmm";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ chessai ];
|
|
|
|
};
|
|
|
|
}
|