From 10385e8fb8b9a166521c7ff1eb8221094ae02e76 Mon Sep 17 00:00:00 2001 From: Gaurav Garg Date: Thu, 12 Feb 2026 18:29:01 +0530 Subject: [PATCH 1/2] Fix the seg fault without NCCL --- ggml/src/ggml-cuda/ggml-cuda.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml/src/ggml-cuda/ggml-cuda.cu b/ggml/src/ggml-cuda/ggml-cuda.cu index f76b27299e..8cb2a7e9de 100644 --- a/ggml/src/ggml-cuda/ggml-cuda.cu +++ b/ggml/src/ggml-cuda/ggml-cuda.cu @@ -329,9 +329,9 @@ static ggml_cuda_device_info ggml_cuda_init() { dev_ids[id] = id; } NCCL_CHECK(ncclCommInitAll(info.comms, info.device_count, dev_ids)); +#endif // GGML_USE_NCCL return info; -#endif // GGML_USE_NCCL } const ggml_cuda_device_info & ggml_cuda_info() { @@ -1132,7 +1132,7 @@ bool ggml_backend_cuda_allreduce_tensor(ggml_backend_t * backends, struct ggml_t #if !defined(GGML_USE_HIP) && !defined(GGML_USE_MUSA) static bool warning_printed = false; if (!warning_printed) { - GGML_LOG_WARN("%s: NVIDIA Collective Communications Library (NCCL) is unavailable, multi GPU performance will be suboptimal\n"); + GGML_LOG_WARN("NVIDIA Collective Communications Library (NCCL) is unavailable, multi GPU performance will be suboptimal\n"); warning_printed = true; } GGML_UNUSED_VARS(backends, tensors, n_backends); From 9bb9d783684298dac400df8e969b2cd17f67c84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Thu, 12 Feb 2026 14:18:49 +0100 Subject: [PATCH 2/2] Apply suggestion from @JohannesGaessler --- ggml/src/ggml-cuda/ggml-cuda.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-cuda/ggml-cuda.cu b/ggml/src/ggml-cuda/ggml-cuda.cu index 8cb2a7e9de..05dd0bdc1d 100644 --- a/ggml/src/ggml-cuda/ggml-cuda.cu +++ b/ggml/src/ggml-cuda/ggml-cuda.cu @@ -1132,7 +1132,7 @@ bool ggml_backend_cuda_allreduce_tensor(ggml_backend_t * backends, struct ggml_t #if !defined(GGML_USE_HIP) && !defined(GGML_USE_MUSA) static bool warning_printed = false; if (!warning_printed) { - GGML_LOG_WARN("NVIDIA Collective Communications Library (NCCL) is unavailable, multi GPU performance will be suboptimal\n"); + GGML_LOG_WARN("%s: NVIDIA Collective Communications Library (NCCL) is unavailable, multi GPU performance will be suboptimal\n", __func__); warning_printed = true; } GGML_UNUSED_VARS(backends, tensors, n_backends);