Skip to content

Commit e08d911

Browse files
authored
amd-libflame: 4.2 -> 5.0 (#348058)
2 parents 5e30d97 + 3665297 commit e08d911

File tree

1 file changed

+38
-27
lines changed
  • pkgs/development/libraries/science/math/amd-libflame

1 file changed

+38
-27
lines changed

pkgs/development/libraries/science/math/amd-libflame/default.nix

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
{ lib
2-
, stdenv
3-
, fetchFromGitHub
4-
, cmake
5-
, gfortran
6-
, python3
7-
, amd-blis
8-
, aocl-utils
9-
10-
, withOpenMP ? true
11-
, blas64 ? false
12-
, withAMDOpt ? true
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
cmake,
6+
gfortran,
7+
python3,
8+
amd-blis,
9+
aocl-utils,
10+
11+
withOpenMP ? true,
12+
blas64 ? false,
13+
withAMDOpt ? true,
1314
}:
1415

1516
stdenv.mkDerivation rec {
1617
pname = "amd-libflame";
17-
version = "4.2";
18+
version = "5.0";
1819

1920
src = fetchFromGitHub {
2021
owner = "amd";
2122
repo = "libflame";
2223
rev = version;
23-
hash = "sha256-eiH2eq+nKUjlB1bZTZNRW1+efCHZ68UOSFy0NpcY1FI=";
24+
hash = "sha256-Shsv5Zd59FN5tq1LY7QqPRtAHEysHIVbPeKIIZ/2eMw=";
2425
};
2526

2627
postPatch = ''
@@ -30,22 +31,32 @@ stdenv.mkDerivation rec {
3031
substituteInPlace CMakeLists.txt --replace '-mtune=native' ""
3132
'';
3233

33-
passthru = { inherit blas64; };
34+
passthru = {
35+
inherit blas64;
36+
};
3437

35-
nativeBuildInputs = [ cmake gfortran python3 ];
38+
nativeBuildInputs = [
39+
cmake
40+
gfortran
41+
python3
42+
];
3643

37-
buildInputs = [ amd-blis aocl-utils ];
44+
buildInputs = [
45+
amd-blis
46+
aocl-utils
47+
];
3848

39-
cmakeFlags = [
40-
"-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib/libaoclutils${stdenv.hostPlatform.extensions.sharedLibrary}"
41-
"-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include"
42-
"-DENABLE_BUILTIN_LAPACK2FLAME=ON"
43-
"-DENABLE_CBLAS_INTERFACES=ON"
44-
"-DENABLE_EXT_LAPACK_INTERFACE=ON"
45-
]
46-
++ lib.optional (!withOpenMP) "-DENABLE_MULTITHREADING=OFF"
47-
++ lib.optional blas64 "-DENABLE_ILP64=ON"
48-
++ lib.optional withAMDOpt "-DENABLE_AMD_OPT=ON";
49+
cmakeFlags =
50+
[
51+
"-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib/libaoclutils${stdenv.hostPlatform.extensions.sharedLibrary}"
52+
"-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include"
53+
"-DENABLE_BUILTIN_LAPACK2FLAME=ON"
54+
"-DENABLE_CBLAS_INTERFACES=ON"
55+
"-DENABLE_EXT_LAPACK_INTERFACE=ON"
56+
]
57+
++ lib.optional (!withOpenMP) "-DENABLE_MULTITHREADING=OFF"
58+
++ lib.optional blas64 "-DENABLE_ILP64=ON"
59+
++ lib.optional withAMDOpt "-DENABLE_AMD_OPT=ON";
4960

5061
postInstall = ''
5162
ln -s $out/lib/libflame.so $out/lib/liblapack.so.3

0 commit comments

Comments
 (0)