Repository: ollama/ollama
Pull request: Remove unnecessary MacOs 13 and lower Patches

While applying the patches. I saw this macos 13 patches which are probably not necessary anymore because macos13 is not supported anymore by ollama. See https://github.com/ollama/ollama/releases/tag/v0.12.5

1. Patch 0020-Diable-ggml-blas-on-macos-v13-and-older.patch
2. Patch 0018-BF16-macos-version-guard.patch

Changed files:
filename: llama/patches/0018-BF16-macos-version-guard.patch
patch: @@ -1,28 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Daniel Hiltgen <daniel@ollama.com>
-Date: Wed, 30 Jul 2025 08:43:46 -0700
-Subject: [PATCH] BF16 macos version guard
-
-Only enable BF16 on supported MacOS versions (v14+)
----
- ggml/src/ggml-metal/ggml-metal-context.m | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/ggml/src/ggml-metal/ggml-metal-context.m b/ggml/src/ggml-metal/ggml-metal-context.m
-index 052efb7ac..b47dc7879 100644
---- a/ggml/src/ggml-metal/ggml-metal-context.m
-+++ b/ggml/src/ggml-metal/ggml-metal-context.m
-@@ -125,7 +125,12 @@ ggml_metal_t ggml_metal_init(ggml_metal_device_t dev) {
- 
-     res->d_queue = dispatch_queue_create("ggml-metal", DISPATCH_QUEUE_CONCURRENT);
- 
--    res->use_bfloat      = props_dev->has_bfloat;
-+    if (@available(macOS 14.0, *)) {
-+        res->use_bfloat = props_dev->has_bfloat;
-+    } else {
-+        res->use_bfloat = false;
-+    }
-+
-     res->use_fusion      = getenv("GGML_METAL_FUSION_DISABLE") == nil;
-     res->use_concurrency = getenv("GGML_METAL_CONCURRENCY_DISABLE") == nil;
- 

filename: llama/patches/0020-Disable-ggml-blas-on-macos-v13-and-older.patch
patch: @@ -1,25 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Daniel Hiltgen <daniel@ollama.com>
-Date: Sun, 3 Aug 2025 10:00:20 -0700
-Subject: [PATCH] Disable ggml-blas on macos v13 and older
-
----
- ggml/src/ggml-blas/ggml-blas.cpp | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/ggml/src/ggml-blas/ggml-blas.cpp b/ggml/src/ggml-blas/ggml-blas.cpp
-index 88d088952..6a38a51a2 100644
---- a/ggml/src/ggml-blas/ggml-blas.cpp
-+++ b/ggml/src/ggml-blas/ggml-blas.cpp
-@@ -507,6 +507,11 @@ static const struct ggml_backend_reg_i ggml_backend_blas_reg_i = {
- };
- 
- ggml_backend_reg_t ggml_backend_blas_reg(void) {
-+    // MacOS prior to v14 does not include cblas_sgemm - disable this backend if it isn't available
-+    if (&cblas_sgemm == NULL) {
-+        GGML_LOG_INFO("Disabling ggml-blas backend on old MacOS version\n");
-+        return NULL;
-+    }
-     static struct ggml_backend_reg ggml_backend_blas_reg = {
-         /* .api_version = */ GGML_BACKEND_API_VERSION,
-         /* .iface       = */ ggml_backend_blas_reg_i,

filename: ml/backend/ggml/ggml/src/ggml-blas/ggml-blas.cpp
patch: @@ -507,11 +507,6 @@ static const struct ggml_backend_reg_i ggml_backend_blas_reg_i = {
 };
 
 ggml_backend_reg_t ggml_backend_blas_reg(void) {
-    // MacOS prior to v14 does not include cblas_sgemm - disable this backend if it isn't available
-    if (&cblas_sgemm == NULL) {
-        GGML_LOG_INFO("Disabling ggml-blas backend on old MacOS version\n");
-        return NULL;
-    }
     static struct ggml_backend_reg ggml_backend_blas_reg = {
         /* .api_version = */ GGML_BACKEND_API_VERSION,
         /* .iface       = */ ggml_backend_blas_reg_i,

filename: ml/backend/ggml/ggml/src/ggml-metal/ggml-metal-context.m
patch: @@ -125,12 +125,7 @@ ggml_metal_t ggml_metal_init(ggml_metal_device_t dev) {
 
     res->d_queue = dispatch_queue_create("ggml-metal", DISPATCH_QUEUE_CONCURRENT);
 
-    if (@available(macOS 14.0, *)) {
-        res->use_bfloat = props_dev->has_bfloat;
-    } else {
-        res->use_bfloat = false;
-    }
-
+    res->use_bfloat      = props_dev->has_bfloat;
     res->use_fusion      = getenv("GGML_METAL_FUSION_DISABLE") == nil;
     res->use_concurrency = getenv("GGML_METAL_CONCURRENCY_DISABLE") == nil;