2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, coreutils, gfortran, gnused
|
2020-11-24 16:29:28 +01:00
|
|
|
, python3, util-linux, which
|
2020-09-05 15:50:54 +02:00
|
|
|
|
2020-12-20 07:11:26 +01:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
2019-10-21 07:26:13 +02:00
|
|
|
}:
|
|
|
|
|
2021-07-17 20:37:27 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-10-21 07:26:13 +02:00
|
|
|
pname = "libxsmm";
|
2021-11-03 13:10:22 +01:00
|
|
|
version = "1.16.3";
|
2019-10-21 07:26:13 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfp";
|
|
|
|
repo = "libxsmm";
|
2020-09-05 15:50:54 +02:00
|
|
|
rev = version;
|
2021-11-03 13:10:22 +01:00
|
|
|
sha256 = "sha256-PpMiD/PeQ0pe5hqFG6VFHWpR8y3wnO2z1dJfHHeItlQ=";
|
2019-10-21 07:26:13 +02:00
|
|
|
};
|
|
|
|
|
2020-09-05 15:50:54 +02:00
|
|
|
nativeBuildInputs = [
|
2019-10-21 07:26:13 +02:00
|
|
|
coreutils
|
2020-09-05 15:50:54 +02:00
|
|
|
gfortran
|
2019-10-21 07:26:13 +02:00
|
|
|
gnused
|
2020-09-05 15:50:54 +02:00
|
|
|
python3
|
2020-11-24 16:29:28 +01:00
|
|
|
util-linux
|
2019-10-21 07:26:13 +02:00
|
|
|
which
|
|
|
|
];
|
|
|
|
|
2020-09-05 15:50:54 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
makeFlags = let
|
|
|
|
static = if enableStatic then "1" else "0";
|
|
|
|
in [
|
|
|
|
"OMP=1"
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"STATIC=${static}"
|
|
|
|
];
|
|
|
|
|
2019-10-21 07:26:13 +02:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2019-10-21 07:26:13 +02:00
|
|
|
description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives";
|
|
|
|
license = licenses.bsd3;
|
2020-05-25 01:06:12 +02:00
|
|
|
homepage = "https://github.com/hfp/libxsmm";
|
2019-10-21 07:26:13 +02:00
|
|
|
platforms = platforms.linux;
|
2021-01-21 18:00:13 +01:00
|
|
|
maintainers = with lib.maintainers; [ chessai ];
|
2019-10-21 07:26:13 +02:00
|
|
|
};
|
|
|
|
}
|