From 04f5445bef5ac310b0f839bf9bfe3ac16255d735 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:26:04 +0800 Subject: [PATCH] fix for macos asserting on exit --- ggml/src/ggml-metal/ggml-metal-device.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ggml/src/ggml-metal/ggml-metal-device.m b/ggml/src/ggml-metal/ggml-metal-device.m index c3c27a61d..aeb7e89fd 100644 --- a/ggml/src/ggml-metal/ggml-metal-device.m +++ b/ggml/src/ggml-metal/ggml-metal-device.m @@ -604,6 +604,12 @@ void ggml_metal_rsets_free(ggml_metal_rsets_t rsets) { return; } + if([rsets->data count] != 0) + { + //kcpp try fix for assert below + return; + } + // note: if you hit this assert, most likely you haven't deallocated all Metal resources before exiting GGML_ASSERT([rsets->data count] == 0);