2022-03-31 18:11:26 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gfortran,
|
2020-11-24 15:29:28 +00:00
|
|
|
python3,
|
|
|
|
util-linux,
|
|
|
|
which,
|
2020-09-05 13:50:54 +00:00
|
|
|
|
2020-12-20 06:11:26 +00:00
|
|
|
enableStatic ? stdenv.hostPlatform.isStatic,
|
2019-10-21 05:26:13 +00:00
|
|
|
}:
|
|
|
|
|
2021-07-17 18:37:27 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-10-21 05:26:13 +00:00
|
|
|
pname = "libxsmm";
|
2024-08-28 13:41:32 +00:00
|
|
|
version = "1.17";
|
2019-10-21 05:26:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-08-28 13:41:32 +00:00
|
|
|
owner = "libxsmm";
|
2019-10-21 05:26:13 +00:00
|
|
|
repo = "libxsmm";
|
2020-09-05 13:50:54 +00:00
|
|
|
rev = version;
|
2024-08-28 13:41:32 +00:00
|
|
|
sha256 = "sha256-s/NEFU4IwQPLyPLwMmrrpMDd73q22Sk2BNid/kedawY=";
|
2019-10-21 05:26:13 +00:00
|
|
|
};
|
|
|
|
|
2024-08-28 13:41:32 +00:00
|
|
|
# Fixes /build references in the rpath
|
|
|
|
patches = [ ./rpath.patch ];
|
|
|
|
|
2023-09-30 21:29:43 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"doc"
|
|
|
|
];
|
2024-08-28 13:41:32 +00:00
|
|
|
|
2020-09-05 13:50:54 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gfortran
|
|
|
|
python3
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux
|
2019-10-21 05:26:13 +00:00
|
|
|
which
|
|
|
|
];
|
|
|
|
|
2020-09-05 13:50:54 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
makeFlags =
|
|
|
|
let
|
|
|
|
static = if enableStatic then "1" else "0";
|
|
|
|
in
|
|
|
|
[
|
|
|
|
"OMP=1"
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"STATIC=${static}"
|
|
|
|
];
|
|
|
|
|
2023-09-30 21:29:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/lib/pkgconfig
|
|
|
|
mv $out/lib/*.pc $dev/lib/pkgconfig
|
|
|
|
|
2024-08-28 13:41:32 +00:00
|
|
|
moveToOutput "share/libxsmm" ''${!outputDoc}
|
2023-09-30 21:29:43 +00:00
|
|
|
'';
|
|
|
|
|
2019-10-21 05:26:13 +00:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-05-29 10:10:05 +00:00
|
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
2019-10-21 05:26:13 +00:00
|
|
|
description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "libxsmm_gemm_generator";
|
2019-10-21 05:26:13 +00:00
|
|
|
license = licenses.bsd3;
|
2020-05-24 23:06:12 +00:00
|
|
|
homepage = "https://github.com/hfp/libxsmm";
|
2019-10-21 05:26:13 +00:00
|
|
|
platforms = platforms.linux;
|
2021-01-21 17:00:13 +00:00
|
|
|
maintainers = with lib.maintainers; [ chessai ];
|
2019-10-21 05:26:13 +00:00
|
|
|
};
|
|
|
|
}
|