Skip to content

Commit 31c698a

Browse files
kurnevskymglambda
authored andcommitted
nix: allow to override rocm gpu targets (ggml-org#10794)
This allows to reduce compile time when you are building for a single GPU.
1 parent fd8c819 commit 31c698a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.devops/nix/package.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# Increases the runtime closure size by ~700M
3232
useMpi ? false,
3333
useRocm ? config.rocmSupport,
34+
rocmGpuTargets ? builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets,
3435
enableCurl ? true,
3536
useVulkan ? false,
3637
llamaVersion ? "0.0.0", # Arbitrary version, substituted by the flake
@@ -188,7 +189,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
188189
]
189190
++ optionals useRocm [
190191
(cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.llvm.clang}/bin/clang")
191-
(cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets))
192+
(cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmGpuTargets)
192193
]
193194
++ optionals useMetalKit [
194195
(lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")

0 commit comments

Comments
 (0)