Skip to content

Commit a94264a

Browse files
Tungsten842olexiyb
authored andcommitted
flake.nix: fix for rocm 5.7 (ggml-org#3853)
1 parent 93c2753 commit a94264a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

Diff for: flake.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+6-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
meta.mainProgram = "llama";
1212
inherit (pkgs.stdenv) isAarch32 isAarch64 isDarwin;
1313
buildInputs = with pkgs; [ openmpi ];
14-
osSpecific = with pkgs; buildInputs ++
15-
(
14+
osSpecific = with pkgs; buildInputs ++ (
1615
if isAarch64 && isDarwin then
1716
with pkgs.darwin.apple_sdk_11_0.frameworks; [
1817
Accelerate
@@ -96,12 +95,15 @@
9695
};
9796
packages.rocm = pkgs.stdenv.mkDerivation {
9897
inherit name src meta postPatch nativeBuildInputs postInstall;
99-
buildInputs = with pkgs; buildInputs ++ [ hip hipblas rocblas ];
98+
buildInputs = with pkgs.rocmPackages; buildInputs ++ [ clr hipblas rocblas ];
10099
cmakeFlags = cmakeFlags ++ [
101100
"-DLLAMA_HIPBLAS=1"
102101
"-DCMAKE_C_COMPILER=hipcc"
103102
"-DCMAKE_CXX_COMPILER=hipcc"
104-
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
103+
# Build all targets supported by rocBLAS. When updating search for TARGET_LIST_ROCM
104+
# in github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/CMakeLists.txt
105+
# and select the line that matches the current nixpkgs version of rocBLAS.
106+
"-DAMDGPU_TARGETS=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102"
105107
];
106108
};
107109
apps.llama-server = {

0 commit comments

Comments
 (0)