Re: Computer architects leaving Intel...

Liste des GroupesRevenir à c arch 
Sujet : Re: Computer architects leaving Intel...
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.arch
Date : 02. Sep 2024, 20:32:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vb53s9$2v9pv$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Mozilla Thunderbird
On 9/1/2024 6:32 PM, MitchAlsup1 wrote:
On Sun, 1 Sep 2024 21:21:38 +0000, BGB wrote:
 
On 9/1/2024 1:34 AM, Terje Mathisen wrote:
MitchAlsup1 wrote:
 
It was a revelation to me when I wrote my first fp emulation code and
grok'ed how having a single guard bit followed by a sticky bit was
sufficient to do this for all rounding modes.
>
At that point I only needed to maintain enough intermediate bits to
guarantee I would still have those rounding bits after normalization.
>
This doesn't mean that I could skip calculating all the bits of the full
NxN->2N mantissa product, only that I didn't need to keep them all
around after normalization.
>
>
OK.
>
It seemed like when I looked over the 1985 spec initially, it only
required that the result be larger than that of the destination
(seemingly missed the point of it also requiring infinite precision).
>
Say, 54*54 => 68 bits, where 68 > 52, under this interpretation, it
would have worked. Granted, this does turn it into a probability game
whether the result is correct or off by 1.
 it is 53×53->106 to get correct rounding in 1 step.
OK. IIRC, I had padded the mantissa with '01' mostly out of paranoia.

>
But, have now since noticed that it did specify computing to infinite
precision (in this version of the standard), which, my FPU does not do.
>
My point exactly,
>
>
There was mention of some operations that I have generally not seen in
the ISA in real-world FPUs:
   An FP remainder operator;
 Something IEE specifies but would require an intermediate of 2045
bits to get correct in all circumstances. This is easier to do in
Sw ! Mc6881 did it in nearly 2300 cycles !!
 
Though, if one is free to choose what is done in HW or SW, a target which does DIV and SQRT in software should still be valid.

   Converters to/from ASCII strings;
 Easier and better in SW.
 
Granted.

   An FP->Int truncate operator with the result still in FP format;
 RND (round) instrution.
 
Neither BJX2 nor RISC-V has this, mor did it exist in SH-4, ...

     Usually, one goes round-trip FP->Int->FP;
 Has underflow and overflow problems 2^1022 -> int=>overflow, ...
Possible, though the library call can check if the input is larger than a limit and return identity since any value larger that E+52 is not going to have any fractional part to round or remove.
Though, for Binary128, it would be similar just needing to go through an Int128 and checking against E+112, ...

   ...
>
Seems like pretty much everyone offloaded these tasks to the C library.
 More modern machines have RND nobody will ever have REM.
Which is probably not a lot, as off-hand I am not aware of many ISA's that have floor/ceil/round in the ISA itself, rather than doing it via conversion to an integer type.
Say:
   double floor(double x)
   {
     long long xi;
     if(x<0.0)
       return(-ceil(-x));
     if(x>=18014398509481984.0)
       return(x);
     xi=x;
     return((double)xi);
   }
   double ceil(double x)
   {
     return(floor(x+0.99999999999999955591079014993738));
   }
   double round(double x)
   {
     return(floor(x+0.5));
   }

>
>
I had ended up with coverage of most of the rest, albeit still lacking a
"trap on denormal" handler (seemingly worked for MIPS and friends, *).
>
So, it seemed like it was getting pretty close to "could maybe pass the
1985 spec if one lawyers it...". Maybe not so much it seems, unless I
fix the FMUL issue (TBD if it can be done without significantly
increasing adder-chain latency).
 You could check for "inability to correctly round and trap on that
{I have a patent on doing this in transcendental instructions}
Most likely option is detecting the presence of non-zero values in the low 19 bits of the mantissa for the inputs (on both values), carry beyond the low 8 bits of the result, and the presence of values with zero exponent but non-zero value, ...

>
>
It is possible I could also add a check to detect and trap multiplies
for cases where both values have non-zero low-order bits (allowing these
to also be emulated in software).
>
So, went and added a flag for "Trap as needed to emulate full IEEE
semantics" to FPSCR, where the idea is that enabling this will cause it
to trap in cases where the FPU detects that the results would likely not
match the IEEE standard (if using FADDG/FSUBG/FMULG/..., generally if
fenv_access is enabled).
>
Might make sense to have a compiler option to assume fenv_access is
always enabled.
>
>
>
*: Though, from what I can gather, most of the N64 games and similar had
operated with this disabled (giving DAZ/FTZ semantics) which apparently
posed an annoyance for later emulators (things like moving platforms in
games like SMB64 would apparently slowly drift upwards or away from the
origin if the map was left running for long enough, etc; due to SSE and
similar tending to operate with denormals enabled).
 GPUs started out without even IEEE 754 formats and over many generations
did more and more of 754, then 2008, and closing in on 2019
OK.
Apparently, it was a gotcha for the people writing the emulators, as they apparently thought "float is float" without taking account that games could operate originally with DAZ/FTZ and that this could subtly effect the results (such as platforms and characters drifting over time), if implemented using FPUs with full IEEE semantics.
Had noted that a similar issue can happen (both ways) when mixing code between a round-nearest FPU ops and a "truncate with partial precision" FPU ops (FADDA/FSUBA/FMULA), as some code started to have drift issues.
Though, still not as significant as when I attempted running Quake with "float" with the low 7 bits cut off the mantissa (or, float with only a 16-bit mantissa). This resulted in notable physics glitches.
Had also tried this for 3D rendering, but noted that it wasn't great with larger scenes. Still better than plain Binary16 though, which was insufficient for the transform and projection matmult.
Can work for vertex positions in 3D models, and for Minecraft-style chunk rendering, if the region size isn't too large and one puts the local coordinate space roughly at the center of the region (say, region=128x128x128 meters, giving a ULP of ~ 6.25 cm, with many features being on the scale of ~ 25cm or so).
Also works OK if the rendered coordinate space is relative to snapshots of the camera position (warped coordinates are then far away from the camera).
Normally OpenGL doesn't allow Binary16 for vertex coords, but TKRA-GL supports this as an extension.

>
>
FMAC (with single rounding, which is the interesting one) you can of
course get catastrophic cancellation, so you need all the 2N mantissa
bits of the multiplication plus the N bits from the addend, then you
either need a normalizer wide enough to take in any possibly alignments
of the two parts, or you must have separate logic for each of the major
cases.
>
>
Yeah, for the 2008 spec onward, would also need this...
>
It is possible to provide it as a library call, but granted this makes
it slower.
>
>
There are FMAC instructions, but they are currently both slow and
double-rounded (so, not so useful). Well, except for Binary16 and
Binary32 which appear single-rounded mostly because they happen to be
performed internally as Binary64 (but are still slow).
>

Date Sujet#  Auteur
27 Aug 24 * Computer architects leaving Intel...539Thomas Koenig
27 Aug 24 +- Re: Computer architects leaving Intel...1Michael S
27 Aug 24 +- Re: Computer architects leaving Intel...1Stephen Fuld
27 Aug 24 `* Re: Computer architects leaving Intel...536John Dallman
28 Aug 24  +* Re: Computer architects leaving Intel...529BGB
28 Aug 24  i`* Re: Computer architects leaving Intel...528MitchAlsup1
28 Aug 24  i `* Re: Computer architects leaving Intel...527BGB
28 Aug 24  i  +* Re: Computer architects leaving Intel...2Robert Finch
28 Aug 24  i  i`- Re: Computer architects leaving Intel...1BGB
28 Aug 24  i  `* Re: Computer architects leaving Intel...524MitchAlsup1
29 Aug 24  i   `* Re: Computer architects leaving Intel...523BGB
29 Aug 24  i    +* Re: Computer architects leaving Intel...511MitchAlsup1
29 Aug 24  i    i`* Re: Computer architects leaving Intel...510BGB
30 Aug 24  i    i +* Re: Computer architects leaving Intel...499John Dallman
30 Aug 24  i    i i+* Re: Computer architects leaving Intel...11Thomas Koenig
30 Aug 24  i    i ii+- Re: Computer architects leaving Intel...1Michael S
30 Aug 24  i    i ii+* Re: Computer architects leaving Intel...8Anton Ertl
30 Aug 24  i    i iii+* Re: Computer architects leaving Intel...2Michael S
30 Aug 24  i    i iiii`- Re: Computer architects leaving Intel...1Anton Ertl
30 Aug 24  i    i iii`* Re: Computer architects leaving Intel...5John Dallman
30 Aug 24  i    i iii `* Re: Computer architects leaving Intel...4Brett
30 Aug 24  i    i iii  +- Re: Computer architects leaving Intel...1John Dallman
2 Sep 24  i    i iii  `* Re: Computer architects leaving Intel...2Terje Mathisen
2 Sep 24  i    i iii   `- Re: Computer architects leaving Intel...1Thomas Koenig
30 Aug 24  i    i ii`- Re: Computer architects leaving Intel...1BGB
30 Aug 24  i    i i`* Re: Computer architects leaving Intel...487Anton Ertl
30 Aug 24  i    i i +* Re: Computer architects leaving Intel...302John Dallman
30 Aug 24  i    i i i`* Re: Computer architects leaving Intel...301David Brown
30 Aug 24  i    i i i +* Re: Computer architects leaving Intel...293Anton Ertl
30 Aug 24  i    i i i i`* Re: Computer architects leaving Intel...292Bernd Linsel
31 Aug 24  i    i i i i +- Re: Computer architects leaving Intel...1Thomas Koenig
31 Aug 24  i    i i i i `* Re: Computer architects leaving Intel...290Thomas Koenig
31 Aug 24  i    i i i i  +- Re: Computer architects leaving Intel...1Thomas Koenig
31 Aug 24  i    i i i i  `* Re: Computer architects leaving Intel...288Bernd Linsel
31 Aug 24  i    i i i i   +- Re: Computer architects leaving Intel...1Thomas Koenig
31 Aug 24  i    i i i i   +* Re: Computer architects leaving Intel...2Thomas Koenig
31 Aug 24  i    i i i i   i`- Re: Computer architects leaving Intel...1Bernd Linsel
31 Aug 24  i    i i i i   `* Re: Computer architects leaving Intel...284Anton Ertl
31 Aug 24  i    i i i i    +* Re: Computer architects leaving Intel...279Thomas Koenig
31 Aug 24  i    i i i i    i+* Re: Computer architects leaving Intel...157Bernd Linsel
31 Aug 24  i    i i i i    ii+* Re: Computer architects leaving Intel...153MitchAlsup1
1 Sep 24  i    i i i i    iii`* Re: Computer architects leaving Intel...152Stephen Fuld
2 Sep 24  i    i i i i    iii `* Re: Computer architects leaving Intel...151Terje Mathisen
2 Sep 24  i    i i i i    iii  `* Re: Computer architects leaving Intel...150Stephen Fuld
3 Sep 24  i    i i i i    iii   +* Re: Computer architects leaving Intel...139David Brown
3 Sep 24  i    i i i i    iii   i+* Re: Computer architects leaving Intel...108Stephen Fuld
4 Sep 24  i    i i i i    iii   ii`* Re: Computer architects leaving Intel...107David Brown
4 Sep 24  i    i i i i    iii   ii +* Re: Computer architects leaving Intel...103Terje Mathisen
4 Sep 24  i    i i i i    iii   ii i+* Re: Computer architects leaving Intel...101David Brown
4 Sep 24  i    i i i i    iii   ii ii+* Re: Computer architects leaving Intel...97jseigh
4 Sep 24  i    i i i i    iii   ii iii`* Re: Computer architects leaving Intel...96David Brown
4 Sep 24  i    i i i i    iii   ii iii `* Re: Computer architects leaving Intel...95Brett
4 Sep 24  i    i i i i    iii   ii iii  +- Re: Computer architects leaving Intel...1Thomas Koenig
4 Sep 24  i    i i i i    iii   ii iii  +- Re: Computer architects leaving Intel...1MitchAlsup1
5 Sep 24  i    i i i i    iii   ii iii  +* Re: Computer architects leaving Intel...8BGB
5 Sep 24  i    i i i i    iii   ii iii  i`* Re: Computer architects leaving Intel...7MitchAlsup1
5 Sep 24  i    i i i i    iii   ii iii  i `* Re: Computer architects leaving Intel...6David Brown
5 Sep 24  i    i i i i    iii   ii iii  i  `* Re: Computer architects leaving Intel...5Niklas Holsti
5 Sep 24  i    i i i i    iii   ii iii  i   `* Re: Computer architects leaving Intel...4David Brown
6 Sep 24  i    i i i i    iii   ii iii  i    `* Re: Computer architects leaving Intel...3BGB
6 Sep 24  i    i i i i    iii   ii iii  i     `* Re: Computer architects leaving Intel...2David Brown
9 Sep 24  i    i i i i    iii   ii iii  i      `- Re: Computer architects leaving Intel...1BGB
5 Sep 24  i    i i i i    iii   ii iii  +* Re: Computer architects leaving Intel...83David Brown
5 Sep 24  i    i i i i    iii   ii iii  i`* Re: Computer architects leaving Intel...82Terje Mathisen
5 Sep 24  i    i i i i    iii   ii iii  i +* Re: Computer architects leaving Intel...79David Brown
5 Sep 24  i    i i i i    iii   ii iii  i i+* Re: Computer architects leaving Intel...2Thomas Koenig
7 Sep 24  i    i i i i    iii   ii iii  i ii`- Re: Computer architects leaving Intel...1Tim Rentsch
5 Sep 24  i    i i i i    iii   ii iii  i i+* Re: Computer architects leaving Intel...74Terje Mathisen
5 Sep 24  i    i i i i    iii   ii iii  i ii+* Re: Computer architects leaving Intel...16David Brown
9 Sep 24  i    i i i i    iii   ii iii  i iii`* Re: Computer architects leaving Intel...15Terje Mathisen
9 Sep 24  i    i i i i    iii   ii iii  i iii +* Re: Computer architects leaving Intel...12David Brown
9 Sep 24  i    i i i i    iii   ii iii  i iii i`* Re: Computer architects leaving Intel...11Brett
10 Sep 24  i    i i i i    iii   ii iii  i iii i +* Re: Computer architects leaving Intel...5Terje Mathisen
10 Sep 24  i    i i i i    iii   ii iii  i iii i i`* Re: Computer architects leaving Intel...4Brett
10 Sep 24  i    i i i i    iii   ii iii  i iii i i +* Re: Computer architects leaving Intel...2Michael S
11 Sep 24  i    i i i i    iii   ii iii  i iii i i i`- Re: Computer architects leaving Intel...1Brett
11 Sep 24  i    i i i i    iii   ii iii  i iii i i `- Re: Computer architects leaving Intel...1Terje Mathisen
10 Sep 24  i    i i i i    iii   ii iii  i iii i `* Re: Computer architects leaving Intel...5David Brown
10 Sep 24  i    i i i i    iii   ii iii  i iii i  +* Re: Computer architects leaving Intel...3Anton Ertl
10 Sep 24  i    i i i i    iii   ii iii  i iii i  i`* Re: Computer architects leaving Intel...2David Brown
10 Sep 24  i    i i i i    iii   ii iii  i iii i  i `- Re: Computer architects leaving Intel...1Stefan Monnier
10 Sep 24  i    i i i i    iii   ii iii  i iii i  `- Re: Computer architects leaving Intel...1BGB
9 Sep 24  i    i i i i    iii   ii iii  i iii `* Re: Computer architects leaving Intel...2Michael S
10 Sep 24  i    i i i i    iii   ii iii  i iii  `- Re: Computer architects leaving Intel...1Michael S
5 Sep 24  i    i i i i    iii   ii iii  i ii+* Re: Computer architects leaving Intel...45Bernd Linsel
6 Sep 24  i    i i i i    iii   ii iii  i iii+- Re: Computer architects leaving Intel...1David Brown
9 Sep 24  i    i i i i    iii   ii iii  i iii+* Re: Computer architects leaving Intel...2Terje Mathisen
9 Sep 24  i    i i i i    iii   ii iii  i iiii`- Re: Computer architects leaving Intel...1Tim Rentsch
14 Sep 24  i    i i i i    iii   ii iii  i iii`* Re: Computer architects leaving Intel...41Kent Dickey
14 Sep 24  i    i i i i    iii   ii iii  i iii +* Re: Computer architects leaving Intel...32Anton Ertl
14 Sep 24  i    i i i i    iii   ii iii  i iii i+* Re: Computer architects leaving Intel...29MitchAlsup1
14 Sep 24  i    i i i i    iii   ii iii  i iii ii`* Re: Computer architects leaving Intel...28Thomas Koenig
15 Sep 24  i    i i i i    iii   ii iii  i iii ii `* Re: Computer architects leaving Intel...27David Brown
16 Sep 24  i    i i i i    iii   ii iii  i iii ii  +* Re: Computer architects leaving Intel...5Thomas Koenig
16 Sep 24  i    i i i i    iii   ii iii  i iii ii  i`* Re: Computer architects leaving Intel...4David Brown
16 Sep 24  i    i i i i    iii   ii iii  i iii ii  i `* Re: Computer architects leaving Intel...3Thomas Koenig
17 Sep 24  i    i i i i    iii   ii iii  i iii ii  i  +- Re: Upwards and downwards compatible, Computer architects leaving Intel...1John Levine
17 Sep 24  i    i i i i    iii   ii iii  i iii ii  i  `- Re: Computer architects leaving Intel...1David Brown
16 Sep 24  i    i i i i    iii   ii iii  i iii ii  `* Re: Computer architects leaving Intel...21Terje Mathisen
16 Sep 24  i    i i i i    iii   ii iii  i iii ii   `* Re: Computer architects leaving Intel...20David Brown
16 Sep 24  i    i i i i    iii   ii iii  i iii ii    +* Re: Computer architects leaving Intel...14Michael S
17 Sep 24  i    i i i i    iii   ii iii  i iii ii    `* Re: Computer architects leaving Intel...5Terje Mathisen
15 Sep 24  i    i i i i    iii   ii iii  i iii i`* Re: Computer architects leaving Intel...2BGB
14 Sep 24  i    i i i i    iii   ii iii  i iii +* Re: Computer architects leaving Intel...3Thomas Koenig
16 Sep 24  i    i i i i    iii   ii iii  i iii `* Re: Computer architects leaving Intel...5Tim Rentsch
6 Sep 24  i    i i i i    iii   ii iii  i ii+* Re: Computer architects leaving Intel...3Tim Rentsch
7 Sep 24  i    i i i i    iii   ii iii  i ii`* Re: Computer architects leaving Intel...9Chris M. Thomasson
5 Sep 24  i    i i i i    iii   ii iii  i i`* Re: Computer architects leaving Intel...2MitchAlsup1
5 Sep 24  i    i i i i    iii   ii iii  i `* Re: Computer architects leaving Intel...2MitchAlsup1
7 Sep 24  i    i i i i    iii   ii iii  `- Re: Computer architects leaving Intel...1Tim Rentsch
4 Sep 24  i    i i i i    iii   ii ii`* Re: Computer architects leaving Intel...3Thomas Koenig
6 Sep 24  i    i i i i    iii   ii i`- Re: Computer architects leaving Intel...1Chris M. Thomasson
4 Sep 24  i    i i i i    iii   ii +- Re: Computer architects leaving Intel...1jseigh
13 Sep 24  i    i i i i    iii   ii `* Re: Computer architects leaving Intel...2Stephen Fuld
3 Sep 24  i    i i i i    iii   i`* Re: Computer architects leaving Intel...30Stefan Monnier
3 Sep 24  i    i i i i    iii   `* Re: Computer architects leaving Intel...10Terje Mathisen
31 Aug 24  i    i i i i    ii`* Re: Computer architects leaving Intel...3Thomas Koenig
1 Sep 24  i    i i i i    i`* Re: Computer architects leaving Intel...121David Brown
1 Sep 24  i    i i i i    +* Re: Computer architects leaving Intel...3John Dallman
3 Sep 24  i    i i i i    `- Re: Computer architects leaving Intel...1Stefan Monnier
30 Aug 24  i    i i i +- Re: Computer architects leaving Intel...1MitchAlsup1
30 Aug 24  i    i i i +* Re: Computer architects leaving Intel...4Stefan Monnier
30 Aug 24  i    i i i `* Re: Computer architects leaving Intel...2John Dallman
8 Sep 24  i    i i `* Re: Computer architects leaving Intel...184Tim Rentsch
30 Aug 24  i    i `* Re: Computer architects leaving Intel...10MitchAlsup1
31 Aug 24  i    `* Re: Computer architects leaving Intel...11Paul A. Clayton
29 Aug 24  `* Re: Computer architects leaving Intel...6Anton Ertl

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal