Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 45e5a1752b | |||
| 104d816bfe | |||
| 7ec5d4922d | |||
| af955ca345 |
@ -47,6 +47,7 @@ let
|
|||||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||||
|
amd_blis = callPackage ./pkgs/amd_blis/default.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
in bscPkgs // {
|
in bscPkgs // {
|
||||||
|
|||||||
69
pkgs/amd_blis/default.nix
Normal file
69
pkgs/amd_blis/default.nix
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
perl,
|
||||||
|
python3,
|
||||||
|
|
||||||
|
# Enable BLAS interface with 64-bit integer width.
|
||||||
|
blasIntSize ? "64",
|
||||||
|
|
||||||
|
# Target architecture. "auto" lets the script decide for itself.
|
||||||
|
# For fox, "zen4" should be used.
|
||||||
|
withArchitecture ? "auto",
|
||||||
|
|
||||||
|
# Enable OpenMP-based threading.
|
||||||
|
withOpenMP ? true,
|
||||||
|
|
||||||
|
# TODO: Use tag of last release insted of commit
|
||||||
|
gitUrl ? "https://github.com/amd/blis.git",
|
||||||
|
gitBranch ? "master",
|
||||||
|
gitCommit ? "16f852a065e76e824d77bc39e2baa82ac19ed419"
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert lib.assertOneOf "blasIntSize" blasIntSize ["32" "64"];
|
||||||
|
let
|
||||||
|
threadingSuffix = lib.optionalString withOpenMP "-mt";
|
||||||
|
|
||||||
|
git = rec {
|
||||||
|
version = src.shortRev;
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = gitUrl;
|
||||||
|
ref = gitBranch;
|
||||||
|
rev = gitCommit;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "amd_blis";
|
||||||
|
inherit (git) src version;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
perl
|
||||||
|
python3
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-cblas"
|
||||||
|
"--blas-int-size=${blasIntSize}"
|
||||||
|
]
|
||||||
|
++ lib.optionals withOpenMP [ "--enable-threading=openmp" ]
|
||||||
|
++ [ withArchitecture ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs configure build/flatten-headers.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
ls $out/lib
|
||||||
|
ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libblas.so.3
|
||||||
|
ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libcblas.so.3
|
||||||
|
ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
|
||||||
|
ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user