summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorTungsten842 <886724vf@anonaddy.me>2023-10-31 18:24:03 +0100
committerGitHub <noreply@github.com>2023-10-31 19:24:03 +0200
commit07178c98e1b61a5e2af39d347add12e7eb9e08e1 (patch)
tree2b1576fe5e7c73ff3ead363c9177a7b87b39663f /flake.nix
parent207b51900e15cc7f89763a3bb1c565fe11cbb45d (diff)
flake.nix: fix for rocm 5.7 (#3853)
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index fa34394b..4cf28d5c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,8 +11,7 @@
meta.mainProgram = "llama";
inherit (pkgs.stdenv) isAarch32 isAarch64 isDarwin;
buildInputs = with pkgs; [ openmpi ];
- osSpecific = with pkgs; buildInputs ++
- (
+ osSpecific = with pkgs; buildInputs ++ (
if isAarch64 && isDarwin then
with pkgs.darwin.apple_sdk_11_0.frameworks; [
Accelerate
@@ -96,12 +95,15 @@
};
packages.rocm = pkgs.stdenv.mkDerivation {
inherit name src meta postPatch nativeBuildInputs postInstall;
- buildInputs = with pkgs; buildInputs ++ [ hip hipblas rocblas ];
+ buildInputs = with pkgs.rocmPackages; buildInputs ++ [ clr hipblas rocblas ];
cmakeFlags = cmakeFlags ++ [
"-DLLAMA_HIPBLAS=1"
"-DCMAKE_C_COMPILER=hipcc"
"-DCMAKE_CXX_COMPILER=hipcc"
- "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
+ # Build all targets supported by rocBLAS. When updating search for TARGET_LIST_ROCM
+ # in github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/CMakeLists.txt
+ # and select the line that matches the current nixpkgs version of rocBLAS.
+ "-DAMDGPU_TARGETS=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102"
];
};
apps.llama-server = {