mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	nix: fix blas support (#6281)
Since no blas was provided to buildInputs, the executable is built without blas support. This is a backport of NixOS/nixpkgs#298567
This commit is contained in:
		| @@ -10,7 +10,7 @@ | |||||||
|   git, |   git, | ||||||
|   python3, |   python3, | ||||||
|   mpi, |   mpi, | ||||||
|   openblas, # TODO: Use the generic `blas` so users could switch between alternative implementations |   blas, | ||||||
|   cudaPackages, |   cudaPackages, | ||||||
|   darwin, |   darwin, | ||||||
|   rocmPackages, |   rocmPackages, | ||||||
| @@ -181,6 +181,7 @@ effectiveStdenv.mkDerivation ( | |||||||
|       ++ optionals useMpi [ mpi ] |       ++ optionals useMpi [ mpi ] | ||||||
|       ++ optionals useOpenCL [ clblast ] |       ++ optionals useOpenCL [ clblast ] | ||||||
|       ++ optionals useRocm rocmBuildInputs |       ++ optionals useRocm rocmBuildInputs | ||||||
|  |       ++ optionals useBlas [ blas ] | ||||||
|       ++ optionals useVulkan vulkanBuildInputs; |       ++ optionals useVulkan vulkanBuildInputs; | ||||||
|  |  | ||||||
|     cmakeFlags = |     cmakeFlags = | ||||||
| @@ -216,8 +217,7 @@ effectiveStdenv.mkDerivation ( | |||||||
|         # Should likely use `rocmPackages.clr.gpuTargets`. |         # 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=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102" | ||||||
|       ] |       ] | ||||||
|       ++ optionals useMetalKit [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ] |       ++ optionals useMetalKit [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ]; | ||||||
|       ++ optionals useBlas [ (lib.cmakeFeature "LLAMA_BLAS_VENDOR" "OpenBLAS") ]; |  | ||||||
|  |  | ||||||
|     # TODO(SomeoneSerge): It's better to add proper install targets at the CMake level, |     # TODO(SomeoneSerge): It's better to add proper install targets at the CMake level, | ||||||
|     # if they haven't been added yet. |     # if they haven't been added yet. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Christian Kögler
					Christian Kögler