From patchwork Mon Mar 31 22:50:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morgan Smith X-Patchwork-Id: 41115 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 40E3C27BBE9; Mon, 31 Mar 2025 23:52:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 64D1627BBE2 for ; Mon, 31 Mar 2025 23:52:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNzB-0003f4-Pl; Mon, 31 Mar 2025 18:52:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzNz9-0003eU-AE for guix-patches@gnu.org; Mon, 31 Mar 2025 18:52:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNz9-00045E-0a for guix-patches@gnu.org; Mon, 31 Mar 2025 18:52:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=iAS8bRIkarcv86ioVit1SDIChmwfvrENcVtYQXiWPUo=; b=JCcy2sdG38wh9az86qI2JkWZv2kezisNgCyb4zCrs0twPxsn+QKYjI5/BbvtK2zbxD6ET9kCDtJbBo/EgAPVUgM7JbMZGMRV0xSV3oG7Pe/DSPAzz2+6FZ3by0Ov01G5m3h8PmardDs6natCRAkuAN3EXWz1Am7KUvWbVB/JsR7ZP+Z0hfuN54RoXLbXTDShxSGOyBdvJojpHLBxn8Gxla9OJ6nXXI8fAcEvo7MqeICqOZXmcE7XGq/nSe0ChrbB4CnIeYj+MQtFP4MXGlLZfQTou/jylCQDnSHEpkcooT53RcYWQLkBSJFKkdeXg2hBsCNiYw+NkWDD7vE5PW0Y6A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNz8-0004a3-Pa for guix-patches@gnu.org; Mon, 31 Mar 2025 18:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#76999] [PATCH v2 2/2] gnu: llama-cpp: Update to 0.0.0-b5013. Resent-From: Morgan Smith Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 22:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76999 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76999@debbugs.gnu.org Cc: Morgan Smith Received: via spool by 76999-submit@debbugs.gnu.org id=B76999.174346149217402 (code B ref 76999); Mon, 31 Mar 2025 22:52:02 +0000 Received: (at 76999) by debbugs.gnu.org; 31 Mar 2025 22:51:32 +0000 Received: from localhost ([127.0.0.1]:43466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNya-0004W2-1I for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:51:31 -0400 Received: from mail-bn8nam04olkn2087.outbound.protection.outlook.com ([40.92.47.87]:13792 helo=NAM04-BN8-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzNyX-0004VA-1u for 76999@debbugs.gnu.org; Mon, 31 Mar 2025 18:51:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OOvwonhJ7ZIE77O3+ep2pyxtCv5FxRZDFRyxVsBSKRZU9HMTQ4hSYDPb8PouuEOW9NvUcoU96PfC/OOOQGVN0aGj6jeFueRlP798nKuiBzLhvBZuSPt/AzlwCHlk+2Y6g6dXubS0u+DB4ePUiFmMWLVnuEgguYjWeoE0LaSTQRNYxJp6z63cX7gf3lOWrcjedXuPnyg9cUOBSsM/RwXlY94rHg/BnopyR+DXVoue1GorWxcpP1PmP1qv6s0GqB62ADmcvwfJ2Wg5pslIJzj4Uf3kWAzR2SEV1Ie/hS940vMj9QyuIMrVyviQ3KM58VzhmZesLD/lOJksn4lrabmOog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iAS8bRIkarcv86ioVit1SDIChmwfvrENcVtYQXiWPUo=; b=Mq5IspzAlSTXuV56rpGVIWbXhH6LZgziMMqfQfWcva3c4SOloL+Q8IRyfzXhEVrgc++9sW4SjIs0z0Ty3tx4jKD8XzPKLNXoxeAgrymREZLut6cRTT2RY4TPIERUhomKiWsuxSk0BhzQFv1+GaLbCXJSpcIb8YrjyGCb5wKYsHX0SCtCj04cJsdbvXz9HMI6w8H6U6zL6FMkonCXK2SKuAp9be6JpxyfpmV4FgRSBBQ68KEvNpnzQofnBZx5Lmq+V0986lta6eYnUjFvdrciIUK3NZn05JOu7GjG/ZGsP6d+MTYAkbkiMRKj/CLZaDBe8snwFX9HIEPSFF9yrpPo+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iAS8bRIkarcv86ioVit1SDIChmwfvrENcVtYQXiWPUo=; b=CAd1+6x2b/Nt7sJaqsppSXlj11Et4tyLKrblxUIE1SeqgxV7DOvYZFGgqxKe9yLjrkl3A17HuGQ2n82jTkgmeKXDknHZsw3yDL8mz+1D5lBFTYoDpUHnwZUbk8T16O4Kp0DidQyQlaH74GooIWfkU8Z74/v+q6WvEVFr6zRgoVEGh3eTc786RN9Ui1CPYDn0Uajhe85hWLku0DXBoyTTEuhRiqZOCO2zHcpUv7++8kz0kxWRXU5KAlXStC0ODHN7vMxrU4U/tM2VGvS2lx5Onb3RDPXr2mPvBQQbTfePS6/ZElU/y44nJBBTeUVGFtVi+vta0d6bcp8HLA5OZAVE+Q== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by MW4PR84MB1682.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1a5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.37; Mon, 31 Mar 2025 22:51:18 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef%4]) with mapi id 15.20.8583.038; Mon, 31 Mar 2025 22:51:18 +0000 From: Morgan Smith Date: Mon, 31 Mar 2025 18:50:48 -0400 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: X-ClientProxiedBy: YT4PR01CA0273.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:109::21) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <916087ded0125310408239d5762536a488e74dbe.1743461447.git.Morgan.J.Smith@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|MW4PR84MB1682:EE_ X-MS-Office365-Filtering-Correlation-Id: 35046cbc-ddfc-4db9-2a16-08dd70a68c65 X-Microsoft-Antispam: BCL:0; ARA:14566002|19110799003|8060799006|15080799006|7092599003|5072599009|461199028|1602099012|10035399004|4302099013|440099028|3412199025|12071999003|41001999003|21061999003|1710799026; X-Microsoft-Antispam-Message-Info: CvexqKckhP5aG332Hdo2eAWcghBpjvFf5GNF7hXjs2IAMFas7f5n35DrjzIhJxsNi8SNEcQeedJtDgNUQyx4U92bNm+8jQq+9gkmz1oFPkRQ5cxrOa9izm2Ovq9mOTxhJWoAN4uG0Cb0mH6Jtta1Ps6IhbbFJ3kEHHnVb3it8TT7uf/R5cHhZ9bHoNFsIkHGYOafmPhfdIpX9U23EWJatKEuPorP7FqFRwopdAjGal7Z4qMVMgfjVDTy6RT/9Il8uX8iTd7kB9FJl4NfjnOx9AyPIPW+Le+rmdk0gWqeChyWOB3JNZdZSfe4XZouoG37fDlLLtjm+wtloBm9YE1rBMgkmYYKV2e7e3QxnKL1M9M5DguauM64QQl2Ttmw0rnipd6mKbdsapD5ISMeFmxg5UBX5cKim0Odr6q4vrmuDCEVEUQ1Vh88RvcmR+2QLvX/zKZeyKdvJK8A0AWDtkmEX1tHmtU11qaNt9mVTt+HvIMFiRLuYLwwXfeFRRetzGscciKuBX2/3G6fCtzY0LqaMmol8rEshML1vGBmhUdHYZYo0k38sjCN0Dg+KyTK5YysNM+movoQT68AvfJfUloWhjggdFfA2H6F4MkolS53VR8MWAcOc72QHjSs6nHysBXqy5z2qv9Szax51qSUPppTqHDSfhhN+E34pZ8w9PPUjTkAFFWBuivKZpXZAvikf4y+YligIPrRx5rZ2mgRIULHqxJecifB1wQjlUUYpHB6ChCvst2DBri3iSdwacYmtr0BMywDt6yes9gPQjH5DtP5N9jOK4HEzFeis572ppt3ieMDZpXuVfZFiBzf3qEzbhNkWp8SCx9SwQlUd8P51uwB74Vs2BTrIEilRXCHSWFOp0Y7XUw4Fzl9eOlz5dbq57KKBUuGIr2ymrIzLPrGyuwCdyOn2QWAtUUueLWSxys3lGZdGupit37YmakK98j7+XcerzVgfGyvr/GMabduWrYDmYd6YTuYqCTwa34KC/zHl+hBNnxK1+hrea7bwp3tWsTdPOdbsFjcCAlgYmfsfKcfB3irQK2wbJVbdrHQMcZumkA/DU0NSR55x/yA3wOAb7E5lhs17Nxhk69VpSXKJv71sXb74t9bbzP/3OPsUaXtXof0Lq5iplURhb4Vjkv4y+FF1Fr1IrFBi3wRb4DhpS26xx/Vzo3zahjC7rFknJu7Ju2DyBOD/QvQcn7+mrA23isLSeZ8m88ElFRyE7Wh7b29qRAO+c92UbNKdPWm85SyYOzzuR4q4nYRLB0KLE/O3jZt6TxksWQIBagYxCUnhkkh9MisqIHVfZJy4c7FHnrIcNtE+qooHdyT3U1B0YIS6FKsltFXq3ZHkBbGW3jmcHR899oN6abZTMoPETHOUqpXCtk= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vA4N3FFmkden4TItZVZgTpRz5bk91SERa+/meZNWjqL0W/Ud17N6GFFOVAOQkusMbBjGo0/lAeW5Xabg9selmdrXAYX/VJoQP7VOYHkFixVdtp4TxY3bu8Z7N4YCgIUoJceLeews2YunhHGXzwfXJNt3a+YMLnQbmijZZyhx+Ippsm0POAF/JThXFrbnWtiuV3E2ykzXol90YrJjwyuMWF8qLQqI7z2GAME6XaLOIh9cS9vbECaXiPg2/+peoXcVPnmpboJoMz1hItZxqaHN0KqUheuDxcmNQLZhK0NjMdUEQWPwZJmd/GCyF/jMRf5Ghoge8q44i5MX05M6vlmgBFySyfYl4wzkMNp0I8rlPevxNxS0pknaLvuJyGPhcvVfbmb+9PjS2DqQB28VRteYQYit86rMv6ihrVrCn0yHASqevqARK7JxYetZ5kZ1p0P53LER1zxTXmjJFFqmoTNFDuER7L9ms4TrbR4SJWmtg5Cxk8UWIdWUFOonOl2pjGw/jnNmAlU20x9PU18EBCl04b/OGuLj4kuJz85s3AgGbrd8Cn0XffNa1pwiqmIFIwcx+TZjm2nITap5iHXj4qTu7l/xc/GNYbr1cgXR7kp8c/X8DV+I9Z4o743eMcdmNYgvJ3ZeONYqv92La9aTbVfkaYtJrqiSLMnJhri28psai3lkqv2JQM1psAgLyk3+fCmT00X1XsVbfSGKl7TBGEGoQ7+Ddz7baQPGUrO81ymf31n1TRxQB8UzCuMnkY2lHtEM8Infh1MEPtyOjI9nmGn7TL+iR62Js8UnpCoEyljFDTbynXkZV6SRhMDXaM3NSZzFKWoQumoiD92hvpsrs2M6J95Na4nV5l7lzBUEdMZ8YFE55ilm7LNZpTo6AC3VpaYzcGoEFFah0fyuDg5Hu3T5yQXWAgoVmLTbLSW9XHIdwSAHNenq1UBm2z44KvM1cDfQX9L0DwukF5xfyau/H9Ri8jF9Hcep3QwFI6bhtkTROXr0nc7ZzJq7QUOwkfNzHaJyJIjkTa5AnuYQRpGCri8KP9h84EdZjT93OtaIYNoCtRTp/rdRTrpiCBgTpq8Ih2cqrGEcbcRGvDeWdBx8ccHgPG6Jaa0SaYgQNqjrdiEvkBkAB4FoM+d3bB4GeBfKT82p4ep2CAMuhQhT5/02SCl+QTkV0SxZog/H2OxRmcnY/JJltTfQ8jAkEL33Mrrc5K9VpCcHuM3dPKlKZztvMtzg/qt61R/rtmHAXcOFIVykCH0saSjavKR/oheTILvj7dHl X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35046cbc-ddfc-4db9-2a16-08dd70a68c65 X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2025 22:51:18.2656 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR84MB1682 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (llama-cpp): Update to 0.0.0-b5013. [inputs]: Add curl, glslang, and python-gguf-llama-cpp. [native-inputs]: bash -> bash-minimal. [source, homepage]: Update URL. [python-scripts]: Rely on upstream to install them. Delete phase. [fix-tests]: Fix an additional test. * gnu/packages/patches/llama-cpp-vulkan-optional.patch: Delete. * gnu/local.mk: Unregister patch. Change-Id: Ic297534cd142cb83e3964eae21b4eb807b74e9bc --- gnu/local.mk | 1 - gnu/packages/machine-learning.scm | 47 +++++++------------ .../patches/llama-cpp-vulkan-optional.patch | 38 --------------- 3 files changed, 17 insertions(+), 69 deletions(-) delete mode 100644 gnu/packages/patches/llama-cpp-vulkan-optional.patch diff --git a/gnu/local.mk b/gnu/local.mk index f03fcb14fc..00b1a7a959 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1845,7 +1845,6 @@ dist_patch_DATA = \ %D%/packages/patches/libmhash-hmac-fix-uaf.patch \ %D%/packages/patches/libmodbus-disable-networking-test.patch \ %D%/packages/patches/lib-tl-for-telegram-memcpy.patch \ - %D%/packages/patches/llama-cpp-vulkan-optional.patch \ %D%/packages/patches/llhttp-ponyfill-object-fromentries.patch \ %D%/packages/patches/lvm2-no-systemd.patch \ %D%/packages/patches/maturin-no-cross-compile.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 7cb807ae91..84be26cf35 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -78,6 +78,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages cmake) #:use-module (gnu packages cpp) #:use-module (gnu packages cran) + #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages dejagnu) #:use-module (gnu packages documentation) @@ -634,7 +635,7 @@ (define-public guile-aiscm-next (deprecated-package "guile-aiscm-next" guile-aiscm)) (define-public llama-cpp - (let ((tag "b4549")) + (let ((tag "b5013")) (package (name "llama-cpp") (version (string-append "0.0.0-" tag)) @@ -642,19 +643,19 @@ (define-public llama-cpp (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ggerganov/llama.cpp") + (url "https://github.com/ggml-org/llama.cpp") (commit tag))) (file-name (git-file-name name tag)) (sha256 - (base32 "1xf2579q0r8nv06kj8padi6w9cv30w58vdys65nq8yzm3dy452a1")) - (patches - (search-patches "llama-cpp-vulkan-optional.patch")))) + (base32 "0s73dz871x53dr366lkzq19f677bwgma2ri8m5vhbfa9p8yp4p3r")))) (build-system cmake-build-system) (arguments (list #:configure-flags - #~(list "-DBUILD_SHARED_LIBS=ON" + #~(list #$(string-append "-DGGML_BUILD_NUMBER=" tag) + "-DBUILD_SHARED_LIBS=ON" "-DGGML_VULKAN=ON" + "-DLLAMA_CURL=ON" "-DGGML_BLAS=ON" "-DGGML_BLAS_VENDOR=OpenBLAS" (string-append "-DBLAS_INCLUDE_DIRS=" @@ -684,32 +685,17 @@ (define-public llama-cpp (substitute* "ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp" (("\"/bin/sh\"") (string-append "\"" (search-input-file inputs "/bin/sh") "\""))))) - (add-after 'unpack 'disable-unrunable-tests + (add-after 'unpack 'fix-tests (lambda _ ;; test-eval-callback downloads ML model from network, cannot ;; run in Guix build environment (substitute* '("examples/eval-callback/CMakeLists.txt") (("COMMAND llama-eval-callback") - "COMMAND true llama-eval-callback")))) - (add-before 'install 'install-python-scripts - (lambda _ - (let ((bin (string-append #$output "/bin/"))) - (define (make-script script) - (let ((suffix (if (string-suffix? ".py" script) "" ".py"))) - (call-with-input-file - (string-append "../source/" script suffix) - (lambda (input) - (call-with-output-file (string-append bin script) - (lambda (output) - (format output "#!~a/bin/python3\n~a" - #$(this-package-input "python") - (get-string-all input)))))) - (chmod (string-append bin script) #o555))) - (mkdir-p bin) - (make-script "convert_hf_to_gguf") - (make-script "convert_llama_ggml_to_gguf") - (make-script "convert_hf_to_gguf_update.py")))) - (add-after 'install-python-scripts 'wrap-python-scripts + "COMMAND true llama-eval-callback")) + ;; Help it find the test files it needs + (substitute* "tests/test-chat.cpp" + (("\"\\.\\./\"") "\"../source/\"")))) + (add-after 'install 'wrap-python-scripts (assoc-ref python:%standard-phases 'wrap)) (add-after 'install 'remove-tests (lambda* (#:key outputs #:allow-other-keys) @@ -717,12 +703,13 @@ (define-public llama-cpp (string-append (assoc-ref outputs "out") "/bin") "^test-"))))))) - (inputs (list python vulkan-headers vulkan-loader)) - (native-inputs (list pkg-config shaderc bash)) + (inputs (list curl glslang python python-gguf-llama-cpp + vulkan-headers vulkan-loader)) + (native-inputs (list pkg-config shaderc bash-minimal)) (propagated-inputs (list python-numpy python-pytorch python-sentencepiece openblas)) (properties '((tunable? . #true))) ;use AVX512, FMA, etc. when available - (home-page "https://github.com/ggerganov/llama.cpp") + (home-page "https://github.com/ggml-org/llama.cpp") (synopsis "Port of Facebook's LLaMA model in C/C++") (description "This package provides a port to Facebook's LLaMA collection of foundation language models. It requires models parameters to be downloaded diff --git a/gnu/packages/patches/llama-cpp-vulkan-optional.patch b/gnu/packages/patches/llama-cpp-vulkan-optional.patch deleted file mode 100644 index 43a49b6a02..0000000000 --- a/gnu/packages/patches/llama-cpp-vulkan-optional.patch +++ /dev/null @@ -1,38 +0,0 @@ -Author: Danny Milosavljevic -Date: 2025-01-29 -License: Expat -Subject: Make Vulkan optional - -See also: - -diff -ru orig/llama.cpp/ggml/include/ggml-vulkan.h llama.cpp/ggml/include/ggml-vulkan.h ---- orig/llama.cpp/ggml/include/ggml-vulkan.h 2025-01-29 10:24:10.894476682 +0100 -+++ llama.cpp/ggml/include/ggml-vulkan.h 2025-02-07 18:28:34.509509638 +0100 -@@ -10,8 +10,6 @@ - #define GGML_VK_NAME "Vulkan" - #define GGML_VK_MAX_DEVICES 16 - --GGML_BACKEND_API void ggml_vk_instance_init(void); -- - // backend API - GGML_BACKEND_API ggml_backend_t ggml_backend_vk_init(size_t dev_num); - -diff -ru orig/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp ---- orig/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp 2025-01-29 10:24:10.922476480 +0100 -+++ llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp 2025-01-29 22:33:19.955087552 +0100 -@@ -8174,8 +8174,13 @@ - /* .iface = */ ggml_backend_vk_reg_i, - /* .context = */ nullptr, - }; -- -- return ® -+ try { -+ ggml_vk_instance_init(); -+ return ® -+ } catch (const vk::SystemError& e) { -+ VK_LOG_DEBUG("ggml_vk_get_device_count() -> Error: System error: " << e.what()); -+ return nullptr; -+ } - } - - // Extension availability