mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-15 09:23:37 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
78 lines
1.8 KiB
Nix
78 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
perl,
|
|
python3,
|
|
|
|
# Enable BLAS interface with 64-bit integer width.
|
|
blas64 ? false,
|
|
|
|
# Target architecture. "amdzen" compiles kernels for all Zen
|
|
# generations. To build kernels for specific Zen generations,
|
|
# use "zen", "zen2", "zen3", or "zen4".
|
|
withArchitecture ? "amdzen",
|
|
|
|
# Enable OpenMP-based threading.
|
|
withOpenMP ? true,
|
|
}:
|
|
|
|
let
|
|
threadingSuffix = lib.optionalString withOpenMP "-mt";
|
|
blasIntSize = if blas64 then "64" else "32";
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "amd-blis";
|
|
version = "5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "amd";
|
|
repo = "blis";
|
|
rev = version;
|
|
hash = "sha256-E6JmV4W0plFJfOAPK1Vn7qkmFalwl6OjqSpxYnhAPmw=";
|
|
};
|
|
|
|
inherit blas64;
|
|
|
|
nativeBuildInputs = [
|
|
perl
|
|
python3
|
|
];
|
|
|
|
# Tests currently fail with non-Zen CPUs due to a floating point
|
|
# exception in one of the generic kernels. Try to re-enable the
|
|
# next release.
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "BLAS-compatible library optimized for AMD CPUs";
|
|
homepage = "https://developer.amd.com/amd-aocl/blas-library/";
|
|
license = licenses.bsd3;
|
|
maintainers = [ maintainers.markuskowa ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|