From 2294f078cd800d5460a7bc7ca2e2ca47c43338a6 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 7 Oct 2024 17:16:59 +0300 Subject: [PATCH] metal : fix maxTransferRate check --- ggml/src/ggml-metal.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ggml/src/ggml-metal.m b/ggml/src/ggml-metal.m index d7c01b9ab..5fc6df772 100644 --- a/ggml/src/ggml-metal.m +++ b/ggml/src/ggml-metal.m @@ -497,11 +497,12 @@ static struct ggml_backend_metal_context * ggml_metal_init(ggml_backend_dev_t de if (@available(macOS 10.12, iOS 16.0, *)) { GGML_LOG_INFO("%s: recommendedMaxWorkingSetSize = %8.2f MB\n", __func__, device.recommendedMaxWorkingSetSize / 1e6); } -#elif TARGET_OS_OSX - if (device.maxTransferRate != 0) { - GGML_LOG_INFO("%s: maxTransferRate = %8.2f MB/s\n", __func__, device.maxTransferRate / 1e6); - } else { - GGML_LOG_INFO("%s: maxTransferRate = built-in GPU\n", __func__); + if (@available(macOS 10.15, *)) { + if (device.maxTransferRate != 0) { + GGML_LOG_INFO("%s: maxTransferRate = %8.2f MB/s\n", __func__, device.maxTransferRate / 1e6); + } else { + GGML_LOG_INFO("%s: maxTransferRate = built-in GPU\n", __func__); + } } #endif