From b0505d550e8b20c40e31999b43524506b1975a05 Mon Sep 17 00:00:00 2001 From: uuuvn Date: Sat, 11 May 2024 23:18:11 +0300 Subject: [PATCH] that's going to be fun --- tinygrad/runtime/autogen/tinymath.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tinygrad/runtime/autogen/tinymath.c b/tinygrad/runtime/autogen/tinymath.c index fd88f2239337d..4e2f1060ffd18 100644 --- a/tinygrad/runtime/autogen/tinymath.c +++ b/tinygrad/runtime/autogen/tinymath.c @@ -17,9 +17,9 @@ static float fromEncodingF(unsigned int e) { return f; } -static _Float16 fromEncodingH(unsigned short s) { - _Float16 f; - // static_assert(sizeof s == sizeof f, "_Float16 and short must have the same +static __fp16 fromEncodingH(unsigned short s) { + __fp16 f; + // static_assert(sizeof s == sizeof f, "__fp16 and short must have the same // size"); __builtin_memcpy(&f, &s, sizeof f); return f; @@ -75,7 +75,7 @@ unsigned short __gnu_f2h_ieee(float f) { #endif -_Float16 __truncdfhf2(double d) { +__fp16 __truncdfhf2(double d) { // You can't just do (half)(float)x, because that makes the result // susceptible to double-rounding. Instead we need to make the first // rounding use round-to-odd, but that doesn't exist on x86, so we have