From 3c4d2a1b7862b8037f208e37f6315e1257cfc67d Mon Sep 17 00:00:00 2001 From: Alex Azarov Date: Sun, 14 Jan 2024 17:34:22 +0100 Subject: [PATCH] Only log on iOS and macOS, ignoring tvOS and other platforms --- ggml-metal.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ggml-metal.m b/ggml-metal.m index 94060a0c0..93681aa83 100644 --- a/ggml-metal.m +++ b/ggml-metal.m @@ -2373,6 +2373,7 @@ static const char * ggml_backend_metal_buffer_type_get_name(ggml_backend_buffer_ } static void ggml_backend_metal_log_allocated_size(id device) { +#if TARGET_OS_IOS || TARGET_OS_OSX if (@available(macOS 10.12, iOS 16.0, *)) { GGML_METAL_LOG_INFO(", (%8.2f / %8.2f)", device.currentAllocatedSize / 1024.0 / 1024.0, @@ -2386,6 +2387,7 @@ static void ggml_backend_metal_log_allocated_size(id device) { } else { GGML_METAL_LOG_INFO(", (%8.2f)\n", device.currentAllocatedSize / 1024.0 / 1024.0); } +#endif } static ggml_backend_buffer_t ggml_backend_metal_buffer_type_alloc_buffer(ggml_backend_buffer_type_t buft, size_t size) {