From 31c18ed12d7b339db60289cf7fdf423108f339f1 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Tue, 12 May 2026 20:48:29 +0800 Subject: [PATCH] tentative fix for allReduce compile error from https://github.com/ggml-org/llama.cpp/pull/22299 --- ggml/src/ggml-cuda/allreduce.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-cuda/allreduce.cu b/ggml/src/ggml-cuda/allreduce.cu index 434689abd..923dbcdc7 100644 --- a/ggml/src/ggml-cuda/allreduce.cu +++ b/ggml/src/ggml-cuda/allreduce.cu @@ -210,7 +210,9 @@ static __global__ void ggml_cuda_ar_add_kernel( const int nt = gridDim.x * blockDim.x; for (int i = tid; i < count; i += nt) { const T_src d_low = ggml_cuda_cast(dst[i]); - dst[i] = ggml_cuda_cast(d_low) + ggml_cuda_cast(src[i]); + const float a = (float) ggml_cuda_cast(d_low); + const float b = (float) ggml_cuda_cast(src[i]); + dst[i] = ggml_cuda_cast(a + b); } }