Nix fixes
This commit is contained in:
parent
5442939fcc
commit
5f687d392b
2 changed files with 17 additions and 2 deletions
|
@ -11,6 +11,9 @@
|
|||
"llama-server"
|
||||
"quantize"
|
||||
"train-text-from-scratch"
|
||||
"llama-bench"
|
||||
"imatrix"
|
||||
"perplexity"
|
||||
];
|
||||
mkApp = name: {
|
||||
type = "app";
|
||||
|
|
|
@ -30,8 +30,15 @@
|
|||
useMpi ? false, # Increases the runtime closure size by ~700M
|
||||
useOpenCL ? false,
|
||||
useRocm ? config.rocmSupport,
|
||||
rocmTargets ? [ "gfx1030" ],
|
||||
useVulkan ? false,
|
||||
llamaVersion ? "0.0.0", # Arbitrary version, substituted by the flake
|
||||
llamaNative ? true,
|
||||
llamaLTO ? true,
|
||||
llamaAVX ? true,
|
||||
llamaAVX2 ? true,
|
||||
llamaFMA ? true,
|
||||
llamaF16C ? true,
|
||||
|
||||
# It's necessary to consistently use backendStdenv when building with CUDA support,
|
||||
# otherwise we get libstdc++ errors downstream.
|
||||
|
@ -205,7 +212,12 @@ effectiveStdenv.mkDerivation (
|
|||
|
||||
cmakeFlags =
|
||||
[
|
||||
(cmakeBool "LLAMA_NATIVE" false)
|
||||
(cmakeBool "LLAMA_NATIVE" llamaNative)
|
||||
(cmakeBool "LLAMA_LTO" llamaLTO)
|
||||
(cmakeBool "LLAMA_AVX" llamaAVX)
|
||||
(cmakeBool "LLAMA_AVX2" llamaAVX2)
|
||||
(cmakeBool "LLAMA_FMA" llamaFMA)
|
||||
(cmakeBool "LLAMA_F16C" llamaF16C)
|
||||
(cmakeBool "LLAMA_BUILD_SERVER" true)
|
||||
(cmakeBool "BUILD_SHARED_LIBS" (!enableStatic))
|
||||
(cmakeBool "CMAKE_SKIP_BUILD_RPATH" true)
|
||||
|
@ -227,7 +239,7 @@ effectiveStdenv.mkDerivation (
|
|||
]
|
||||
++ optionals useRocm [
|
||||
(cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.llvm.clang}/bin/clang")
|
||||
(cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets))
|
||||
(cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmTargets))
|
||||
]
|
||||
++ optionals useMetalKit [
|
||||
(lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")
|
||||
|
|
Loading…
Add table
Reference in a new issue