From 5596a41a38b1963a2f1b9355439fe420ab34192b Mon Sep 17 00:00:00 2001 From: hchengit <95317477+hchengit@users.noreply.github.com> Date: Tue, 14 Jul 2026 23:11:59 -0700 Subject: [PATCH] llama: fix GGML_METAL=ON build - missing ggml-metal.h include in llama-dflash.cpp (#2134) llama-dflash.cpp calls ggml_backend_is_metal() and ggml_backend_metal_set_n_cb() inside an #ifdef GGML_USE_METAL block but never includes ggml-metal.h, so any Metal-enabled build fails to compile. Add the same guarded include llama.cpp already uses. --- src/llama-dflash.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/llama-dflash.cpp b/src/llama-dflash.cpp index ae630b31..38c024c5 100644 --- a/src/llama-dflash.cpp +++ b/src/llama-dflash.cpp @@ -9,6 +9,10 @@ #include "ggml.h" #include "ggml-backend.h" +#ifdef GGML_USE_METAL +# include "ggml-metal.h" +#endif + #include #include #include