From 3591f1cc8ca313b91ff823ee65f140e56a472b96 Mon Sep 17 00:00:00 2001 From: Calvin Laurenson Date: Sun, 16 Jun 2024 08:00:05 -0700 Subject: [PATCH] Use F32 sqrtf instead of F64 sqrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Johannes Gäßler --- ggml-cuda/unary.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-cuda/unary.cu b/ggml-cuda/unary.cu index c0ddb8a56..f9e208011 100644 --- a/ggml-cuda/unary.cu +++ b/ggml-cuda/unary.cu @@ -98,7 +98,7 @@ static __global__ void sqrt_f32(const float * x, float * dst, const int k) { if (i >= k) { return; } - dst[i] = sqrt(x[i]); + dst[i] = sqrtf(x[i]); } static void gelu_f32_cuda(const float * x, float * dst, const int k, cudaStream_t stream) {