From 66caa42b534789a1d724cec6d03d9e98d478f0ca Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Thu, 22 Jan 2026 10:46:57 +0000 Subject: [PATCH] Fix build with GGML_CUDA_GRAPHS=OFF --- ggml/src/ggml-cuda.cu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ggml/src/ggml-cuda.cu b/ggml/src/ggml-cuda.cu index 09c93606..330f72b4 100644 --- a/ggml/src/ggml-cuda.cu +++ b/ggml/src/ggml-cuda.cu @@ -512,7 +512,11 @@ ggml_backend_cuda_context::ggml_backend_cuda_context(int device) : ggml_backend_cuda_context::~ggml_backend_cuda_context() { +#ifdef USE_CUDA_GRAPH + // Let's leave this debug log in for now, so we have a trace in case + // number of CUDA graphs goes crazy printf("%s: have %d graphs\n", __func__, int(cuda_graphs.size())); +#endif std::unique_lock lock(ggml_cuda_lock); ggml_cuda_lock_cv.wait(lock, []{ return ggml_cuda_lock_counter == 0; });