llama-cpp: 5985 -> 6123 (#432350)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{ llama-cpp }:
|
||||
|
||||
llama-cpp.override { vulkanSupport = true; }
|
||||
@@ -0,0 +1,15 @@
|
||||
index b97e7bf9..9cdc62a4 100644
|
||||
--- a/ggml/src/ggml-vulkan/CMakeLists.txt
|
||||
+++ b/ggml/src/ggml-vulkan/CMakeLists.txt
|
||||
@@ -70,11 +70,5 @@ if (Vulkan_FOUND)
|
||||
"GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT"
|
||||
)
|
||||
|
||||
- test_shader_extension_support(
|
||||
- "GL_EXT_bfloat16"
|
||||
- "${CMAKE_CURRENT_SOURCE_DIR}/vulkan-shaders/test_bfloat16_support.comp"
|
||||
- "GGML_VULKAN_BFLOAT16_GLSLC_SUPPORT"
|
||||
- )
|
||||
-
|
||||
target_link_libraries(ggml-vulkan PRIVATE Vulkan::Vulkan)
|
||||
target_include_directories(ggml-vulkan PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
@@ -72,13 +72,13 @@ let
|
||||
in
|
||||
effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
pname = "llama-cpp";
|
||||
version = "5985";
|
||||
version = "6123";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ggml-org";
|
||||
repo = "llama.cpp";
|
||||
tag = "b${finalAttrs.version}";
|
||||
hash = "sha256-OoV/p4Es/X/xQW7PpDLq5YLVYjieIE5+1itvtJECH54=";
|
||||
hash = "sha256-4kqbKGPPOkOkHXA4IeLuj/0P5jpqtGlGuVKeUD4UhZY=";
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
git -C "$out" rev-parse --short HEAD > $out/COMMIT
|
||||
@@ -86,6 +86,8 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
};
|
||||
|
||||
patches = lib.optionals vulkanSupport [ ./disable_bfloat16.patch ];
|
||||
|
||||
postPatch = ''
|
||||
# Workaround for local-ai package which overrides this package to an older llama-cpp
|
||||
if [ -f ./ggml/src/ggml-metal.m ]; then
|
||||
@@ -139,11 +141,11 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
++ optionals cudaSupport [
|
||||
(cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
|
||||
]
|
||||
++ optionals rocmSupport ([
|
||||
++ optionals rocmSupport [
|
||||
(cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.clr.hipClangPath}/clang++")
|
||||
# TODO: this should become `clr.gpuTargets` in the future.
|
||||
(cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmPackages.rocblas.amdgpu_targets)
|
||||
])
|
||||
]
|
||||
++ optionals metalSupport [
|
||||
(cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")
|
||||
(cmakeBool "LLAMA_METAL_EMBED_LIBRARY" true)
|
||||
@@ -186,6 +188,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
badPlatforms = optionals (cudaSupport || openclSupport) lib.platforms.darwin;
|
||||
broken = (metalSupport && !effectiveStdenv.hostPlatform.isDarwin);
|
||||
broken = metalSupport && !effectiveStdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user