Skip to content

Commit

Permalink
that's going to be fun
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuvn committed May 11, 2024
1 parent c82c5de commit b0505d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tinygrad/runtime/autogen/tinymath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b0505d5

Please sign in to comment.