From ae6bebccb11b17ebeca2809e00e204f45644c76d Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Tue, 26 Dec 2023 04:33:24 +0000 Subject: [PATCH] nix: respect config.cudaCapabilities --- .devops/nix/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index 3222ec469..cb1e8f480 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -150,6 +150,14 @@ effectiveStdenv.mkDerivation ( (cmakeBool "LLAMA_HIPBLAS" useRocm) (cmakeBool "LLAMA_METAL" useMetalKit) ] + ++ optionals useCuda [ + ( + with cudaPackages.flags; + cmakeFeature "CMAKE_CUDA_ARCHITECTURES" ( + builtins.concatStringsSep ";" (map dropDot cudaCapabilities) + ) + ) + ] ++ optionals useRocm [ (cmakeFeature "CMAKE_C_COMPILER" "hipcc") (cmakeFeature "CMAKE_CXX_COMPILER" "hipcc")