From 116669655c20fc1d50de6fd13e47abf6cfb4b962 Mon Sep 17 00:00:00 2001 From: Jamaika1 Date: Fri, 2 Jan 2026 12:51:07 +0100 Subject: [PATCH] Fix: added ``` fattn-common.cuh: In function 'void flash_attn_mask_to_KV_max(const half2*, int*, int, int, int)': fattn-common.cuh:599:38: error: there are no arguments to 'isinf' that depend on a template parameter, so a declaration of 'isinf' must be available [-Wtemplate-body] 599 | all_inf = all_inf && int(isinf(tmp.x)) && int(isinf(tmp.y)); | ^~~~~ fattn-common.cuh:599:38: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) fattn-common.cuh:599:59: error: there are no arguments to 'isinf' that depend on a template parameter, so a declaration of 'isinf' must be available [-Wtemplate-body] 599 | all_inf = all_inf && int(isinf(tmp.x)) && int(isinf(tmp.y)); | ^~~~~ ``` --- ggml/src/ggml-cuda/fattn-common.cuh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-cuda/fattn-common.cuh b/ggml/src/ggml-cuda/fattn-common.cuh index 8dc82a9d..57a97812 100644 --- a/ggml/src/ggml-cuda/fattn-common.cuh +++ b/ggml/src/ggml-cuda/fattn-common.cuh @@ -4,6 +4,7 @@ #include "convert.cuh" #include "vecdotq.cuh" +#include #include #define FATTN_KQ_STRIDE 256 @@ -595,7 +596,7 @@ static __global__ void flash_attn_mask_to_KV_max( #pragma unroll for (int j = 0; j < ncols1; ++j) { const float2 tmp = __half22float2(mask[j*s31 + KV_max_sj/2 + tid]); - all_inf = all_inf && int(isinf(tmp.x)) && int(isinf(tmp.y)); + all_inf = all_inf && int(std::isinf(tmp.x)) && int(std::isinf(tmp.y)); } all_inf = warp_reduce_all(all_inf);