From: Daniel Bevenius Date: Thu, 14 May 2026 03:28:56 +0000 (+0200) Subject: Revert "ggml-cuda : add explicit casts to -INFINITY for float and half2 types" X-Git-Tag: upstream/1.9.2~425 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=5a24c7538fcf5ccc04770b03fe569a98cf1b0f5d;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp Revert "ggml-cuda : add explicit casts to -INFINITY for float and half2 types" This reverts commit a2839b4404de473bc7af127b7b308d530afda024. Reverting this as after closer inspection these only warnings and not errors. --- diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh index 246a7619..10817505 100644 --- a/ggml/src/ggml-cuda/common.cuh +++ b/ggml/src/ggml-cuda/common.cuh @@ -582,9 +582,9 @@ template struct block_reduce_policy { static __device__ T sentinel() { if constexpr (std::is_same_v) { - return -(float)INFINITY; + return -INFINITY; } else if constexpr (std::is_same_v) { - return make_half2(__float2half(-(float)INFINITY), __float2half(-(float)INFINITY)); + return make_half2(-INFINITY, -INFINITY); } else { static_assert(ggml_cuda_dependent_false_v, "Unsupported type for block reduce max"); }