2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, gfortran
|
2020-11-24 20:58:05 +00:00
|
|
|
, python3, util-linux, which
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-05-29 06:06:01 +00:00
|
|
|
pname = "libxsmm";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.16.3";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfp";
|
|
|
|
repo = "libxsmm";
|
2020-09-25 04:45:31 +00:00
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-PpMiD/PeQ0pe5hqFG6VFHWpR8y3wnO2z1dJfHHeItlQ=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gfortran
|
|
|
|
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}"
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/lib/pkgconfig
|
|
|
|
mv $out/lib/*.pc $dev/lib/pkgconfig
|
|
|
|
|
|
|
|
moveToOutput "share/libxsmm" "$doc"
|
|
|
|
'';
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2020-05-29 06:06:01 +00:00
|
|
|
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;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ chessai ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|