diff options
Diffstat (limited to 'nixpkgs/pkgs/by-name/ll/llama-cpp/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/ll/llama-cpp/package.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/by-name/ll/llama-cpp/package.nix b/nixpkgs/pkgs/by-name/ll/llama-cpp/package.nix index 43ff55742ca1..74be7dc68541 100644 --- a/nixpkgs/pkgs/by-name/ll/llama-cpp/package.nix +++ b/nixpkgs/pkgs/by-name/ll/llama-cpp/package.nix @@ -16,6 +16,8 @@ , clblast , blasSupport ? builtins.all (x: !x) [ cudaSupport metalSupport openclSupport rocmSupport vulkanSupport ] +, blas + , pkg-config , metalSupport ? stdenv.isDarwin && stdenv.isAarch64 && !openclSupport , vulkanSupport ? false @@ -69,13 +71,13 @@ let in effectiveStdenv.mkDerivation (finalAttrs: { pname = "llama-cpp"; - version = "2481"; + version = "2568"; src = fetchFromGitHub { owner = "ggerganov"; repo = "llama.cpp"; rev = "refs/tags/b${finalAttrs.version}"; - hash = "sha256-40GSZZEnjM9L9KVVKdSKtBoSRy996l98ORM4NeltsSM="; + hash = "sha256-yBlLChtzfAi2TAGUO1zdnpHCvi5YDCzjdflQgTWh98Y="; }; postPatch = '' @@ -91,9 +93,10 @@ effectiveStdenv.mkDerivation (finalAttrs: { buildInputs = optionals effectiveStdenv.isDarwin darwinBuildInputs ++ optionals cudaSupport cudaBuildInputs - ++ optionals mpiSupport mpi + ++ optionals mpiSupport [ mpi ] ++ optionals openclSupport [ clblast ] ++ optionals rocmSupport rocmBuildInputs + ++ optionals blasSupport [ blas ] ++ optionals vulkanSupport vulkanBuildInputs; cmakeFlags = [ @@ -104,7 +107,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { (cmakeBool "BUILD_SHARED_LIBS" true) (cmakeBool "LLAMA_BLAS" blasSupport) (cmakeBool "LLAMA_CLBLAST" openclSupport) - (cmakeBool "LLAMA_CUBLAS" cudaSupport) + (cmakeBool "LLAMA_CUDA" cudaSupport) (cmakeBool "LLAMA_HIPBLAS" rocmSupport) (cmakeBool "LLAMA_METAL" metalSupport) (cmakeBool "LLAMA_MPI" mpiSupport) @@ -128,8 +131,10 @@ effectiveStdenv.mkDerivation (finalAttrs: { # 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" ] - ++ optionals metalSupport [ (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ] - ++ optionals blasSupport [ (cmakeFeature "LLAMA_BLAS_VENDOR" "OpenBLAS") ]; + ++ optionals metalSupport [ + (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") + (cmakeBool "LLAMA_METAL_EMBED_LIBRARY" true) + ]; # upstream plans on adding targets at the cmakelevel, remove those # additional steps after that |