]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
nix: allow to override rocm gpu targets (#10794)
authorEvgeny Kurnevsky <redacted>
Sat, 14 Dec 2024 18:17:36 +0000 (18:17 +0000)
committerGitHub <redacted>
Sat, 14 Dec 2024 18:17:36 +0000 (10:17 -0800)
This allows to reduce compile time when you are building for a single GPU.

.devops/nix/package.nix

index b88e6ca809f1f0b74bb56de643a72ad69f52ef90..043c4364b956ac30127e089216be545a499a687c 100644 (file)
@@ -31,6 +31,7 @@
   # Increases the runtime closure size by ~700M
   useMpi ? false,
   useRocm ? config.rocmSupport,
+  rocmGpuTargets ? builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets,
   enableCurl ? true,
   useVulkan ? false,
   llamaVersion ? "0.0.0", # Arbitrary version, substituted by the flake
@@ -188,7 +189,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
     ]
     ++ optionals useRocm [
       (cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.llvm.clang}/bin/clang")
-      (cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets))
+      (cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmGpuTargets)
     ]
     ++ optionals useMetalKit [
       (lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")