]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Revert "ggml-cuda : add explicit casts to -INFINITY for float and half2 types"
authorDaniel Bevenius <redacted>
Thu, 14 May 2026 03:28:56 +0000 (05:28 +0200)
committerGeorgi Gerganov <redacted>
Thu, 14 May 2026 18:26:48 +0000 (21:26 +0300)
This reverts commit a2839b4404de473bc7af127b7b308d530afda024.

Reverting this as after closer inspection these only warnings and not
errors.

ggml/src/ggml-cuda/common.cuh

index 246a76193ca6b843c00f5a112c889a4b94902bf1..10817505d9f0471405b4dc6766f7af268e242645 100644 (file)
@@ -582,9 +582,9 @@ template <typename T> struct block_reduce_policy<block_reduce_method::MAX, T> {
 
     static __device__ T sentinel() {
         if constexpr (std::is_same_v<T, float>) {
-            return -(float)INFINITY;
+            return -INFINITY;
         } else if constexpr (std::is_same_v<T, half2>) {
-            return make_half2(__float2half(-(float)INFINITY), __float2half(-(float)INFINITY));
+            return make_half2(-INFINITY, -INFINITY);
         } else {
             static_assert(ggml_cuda_dependent_false_v<T>, "Unsupported type for block reduce max");
         }