Skip to content

Commit

Permalink
nix: respect config.cudaCapabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneSerge committed Dec 26, 2023
1 parent 4522c47 commit ae6bebc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .devops/nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ae6bebc

Please sign in to comment.