2020-09-05 14:50:54 +01:00
|
|
|
{ stdenv, fetchFromGitHub, coreutils, gfortran, gnused
|
|
|
|
, python3, utillinux, which
|
|
|
|
|
|
|
|
, enableStatic ? false
|
2019-10-21 06:26:13 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2020-09-05 14:50:54 +01:00
|
|
|
version = "1.16.1";
|
2019-10-21 06:26:13 +01:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "libxsmm";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfp";
|
|
|
|
repo = "libxsmm";
|
2020-09-05 14:50:54 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1c1qj6hcdfx11bvilnly92vgk1niisd2bjw1s8vfyi2f7ws1wnp0";
|
2019-10-21 06:26:13 +01:00
|
|
|
};
|
|
|
|
|
2020-09-05 14:50:54 +01:00
|
|
|
nativeBuildInputs = [
|
2019-10-21 06:26:13 +01:00
|
|
|
coreutils
|
2020-09-05 14:50:54 +01:00
|
|
|
gfortran
|
2019-10-21 06:26:13 +01:00
|
|
|
gnused
|
2020-09-05 14:50:54 +01:00
|
|
|
python3
|
2019-10-21 06:26:13 +01:00
|
|
|
utillinux
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
2020-09-05 14:50:54 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
makeFlags = let
|
|
|
|
static = if enableStatic then "1" else "0";
|
|
|
|
in [
|
|
|
|
"OMP=1"
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"STATIC=${static}"
|
|
|
|
];
|
|
|
|
|
2019-10-21 06:26:13 +01: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;
|
2020-05-25 00:06:12 +01:00
|
|
|
homepage = "https://github.com/hfp/libxsmm";
|
2019-10-21 06:26:13 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ chessai ];
|
|
|
|
};
|
|
|
|
}
|