Nix fixes
This commit is contained in:
parent
ee52225067
commit
16a5441fa1
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)
|
||||
|
@ -234,7 +246,7 @@ effectiveStdenv.mkDerivation (
|
|||
# in https://github.com/ROCmSoftwarePlatform/rocBLAS/blob/develop/CMakeLists.txt
|
||||
# and select the line that matches the current nixpkgs version of rocBLAS.
|
||||
# Should likely use `rocmPackages.clr.gpuTargets`.
|
||||
"-DAMDGPU_TARGETS=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102"
|
||||
"-DAMDGPU_TARGETS=${rocmTargets}"
|
||||
]
|
||||
++ optionals useMetalKit [
|
||||
(lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")
|
||||
|
|
Loading…
Add table
Reference in a new issue