« first day (2168 days earlier)      last day (2791 days later) » 

9:00 PM
@orlp Your "static scheduling" is basically a more flexible version of SIMD.
 
I am still of the opinion that if you scratch off the "Intel" and remove the Decoder you'll find the word "DIGITAL"
 
Since SIMD basically "statically schedules" multiple ops together.
@Mgetz That's common in digital signal processors.
Power7 also did that. But with 6 or 7 cycle latency.
AMD Bulldozer did that with 5-6 cycle latency.
Haswell doesn't do it. Skylake does it with 4 cycle latency.
Knights Landing does with 6 cycle latency.
AMD Zen will not do it. They're choosing to sacrifice FMA performance for better separated add/mul throughput.
 
@Mysticial did they also make div 4 cycles?
or is div still special?
(fp)
 
lolno
Division is fundamentally slow.
 
I understand that
 
9:04 PM
That reminds me
double f = ...;
f /= 2.0;
f *= 0.5;
Have those two operations become, like. Synonymous yet?
 
that's compiler specific
not architecture specific
in this particular example any compiler should be able to tranform it into the second form
because 0.5 is a power of two
maybe some compiler in the very strictest IEEE compatibility can't translate an arbitrary constant division to a multiplication because of rounding errors
 
@Mgetz You probably won't find the actual word--but you might find a sub-micron sized Energizer Bunny...
 
Guess I'll stick to *= 0.5 then...!
 
@ThePhD fwiw GCC does translate it
 
@JerryCoffin The Alpha was still the better processor, and way ahead of its time
 
9:07 PM
however
 
@Mgetz I actually saw this "FMA everything" thing coming a mile away after I worked with the Power7 in grad school. Since the latencies of FP add and FP mul were so close anyway, you're not losing much by making an FP add as slow as an FP mul. So you can save a shit-ton of area by shoving everything through a generic FMA.
 
double f(double x) { return x / 23.2323589; }
double g(double x) { return x * (1 / 23.2323589); }
these two will compile to different code on GCC
because of rounding error differences, I presume
(those can never happen with 0.5 / 2 because of how IEEE754 works)
 
@Mysticial yeah, and you can take intel's standard "Throw silicon at it" fix to make it fast while still using less silicon than if they were independent
 
with -ffast-math f and g compile to the same assembly
so to summarize, I can schedule 2 fp ops (excluding div) per cycle, and will get results 4 cycles later
for a maximum ILP utilization of 8
 
@Mgetz That's what they're doing with wider and wider vectors. Simplifying the building blocks (like having only an FMA unit), lets them do more copy-pasting. :)
 
9:11 PM
@Mgetz I certainly liked it (and yes, the Alpha was what I was referring to--off on the corner of the die, several (21064, 21068 and 21164, at least) had a picture of an Energizer Bunny in the mask. One (the 068, if memory serves) also listed the names of all the designers.
@Mysticial Lower design cost at the expense of only a few million extra transistors. Perfectly reasonable trade-off in a 10 nm process.
 
@Mysticial probably higher reliability too, since the logic is simpler... which means higher clocked parts, which is a nice competitive advantage
 
@JerryCoffin Haswell came pretty close to the FMA-only approach. FP mul and FMA went through the same FMA with 5 cycle latency. But they weren't willing to increase the latency of FP add from 3 to 5 cycles. So they kept the 3-cycle FP adder on one port. On the other hand, there are 2 ports with the FMA. So you could do 2 mul/FMA/cycle, but only one FP add/cycle.
Skylake brought the FMA latency down to 4. That was a good enough compromise. So they went ahead and upped the latency of FP add from 3 to 4 cycles. And now they can go into either port for 2/cycle.
Broadwell is weird though. They have 3 cycle latency FP add. But the FMA is still 5 cycles. Which means the FP mul isn't implemented as a*b + 0.
Make me wonder if they decided to toss in a dedicated FP mul because of all the extra area they gained from going 22 -> 14nm.
@orlp I'm looking at Agner's tables for Skylake. The x87 FP add goes into a different port than the SIMD FP. So it might be possible to exceed Skylake's theoretical peak FLOPS.
 
@Mysticial are you telling me my CPU can finally be a successful heat element?
no more central heating required
 
9:26 PM
@Mysticial eh... I'd prefer they put the silicon into the decoder or cache
 
If you dual issue FMA into the two FP ports. And issue an fadd into the 3rd port. You can get 33 SP flops/cycle or 17 DP flops/cycle.
 
hmm
the problem with Uplink is that you can rob banks too easily
you can rob enough money to pay for everything in the game in about an hour
 
I'm attempted to write a benchmark to do that just to prove it can be done. But I'd need to drop down to assembly since I can't get a compiler to generate any x87 FPU instructions.
 
@Abyx My coworker notified me 21 minutes after the post went up. I made a ticket and assigned to myself for the upgrade ;p
 
@Mgetz At least when I modeled things out, I became pretty well convinced that the retirement unit was a bottleneck more often than the decoders.
 
9:29 PM
@Puppy oh, you use TS, cool
 
of course
what do I look like, some sort of JS monkey?
 
user1804599
I'm a geocentrist. I believe the Earth is at the center of the observable universe.
 
@Mysticial Beware! Here there be...well, not dragons, but a stack-based design that's an utter pain to use well at all.
 
@Puppy yeah. IMO TS is the best out of all the other transpiles. not perfect though
 
@JerryCoffin that is a part of the CPU I know the least about
 
9:31 PM
yeah
one thing that I don't like about TS is that it's hard to type immutable updates
looking forward to null/undefined checks and readonly in TS2 though
 
3: ax^3 + bx^2 + cx + d
0   xx = x*x;
1   ab = a*x + b; cd = c*x + d;
5   r = ab*xx + cd;
9   return r;

4: ax^4 + bx^3 + cx^2 + dx + e
0   xx = x*x; bc = b*x + c;
1   de = d*x + e;
4   x4 = xx*xx;
5   r = xx*bc+de;
9   r = a*x4+r;
13  return r;
@Mysticial some manual scheduling
 
@JerryCoffin Yeah. I've never done x87 FPU inline assembly before.
 
@JerryCoffin with limited amount of registers to boot
 
@Mysticial horner's FMA form for x^4 polynomial would take 4 FMAs, total latency 16
 
@Mysticial I have done it. I avoid it when I can (though I'd probably prefer it over writing, say, Java).
 
9:35 PM
@JerryCoffin Wow, that says a lot.
 
@Abyx The limited number rarely becomes much of an issue--being stack based, it's hard to make good use of nearly all the registers you do have.
 
@Mysticial IIRC switching between x87 and SSE does incur a cost
 
@JerryCoffin well it depends. I did write the Mandelbrot set algorithm in inline asm, and it wasn't easy to keep all the temp. variables only in 8 registers
 
@Mysticial actually there is a simpler schedule:
4: ax^4 + bx^3 + cx^2 + dx + e
0   xx = x*x; ab = a*x+b
1   cd = c*x+d
5   abcd = xx*ab+cd
9   r = abcd*x+e
13  return r
4FMA, 1 mul for 3 less latency than 4FMA horner
 
@Mgetz Where'd you read that from? Switching between x87 and MMX has a cost since they share registers. But not between x87 and SSE.
 
9:41 PM
@Mgetz Switching between x87 and MMX certainly does.
 
Buh.
Need to install OCaml on this machine.
 
@ThePhD Oh, I'm sure there must be an alternative. If you really hate the machine so much, just burn it or something.
 
user1804599
9:58 PM
@ThePhD install OPAM
 
user1804599
If you're on Windows then RIP
 
@Mysticial n=4 requires 13, n=7 requires... 14
7: ax^7 + bx^6 + cx^5 + dx^4 + ex^3 + fx^2 + gx + h
0   x2 = x*x;
1   ab = a*x + b; cd = c*x + d;
2   ef = e*x + f; gh = g*x + h;
4   x4 = x2*x2;
5   abcd = ab*x2 + cd;
6   efgh = ef*x2 + gh;
10  r = abcd*x4 + efgh;
14  return r;
although maybe it can be scheduled more optimally
I'm not certain
 
user1804599
10:13 PM
Due to an unforeseen security event on our network, we advise all users to change their password, telephone number, and mother’s maiden name
 
user1804599
lolyahoo
 
There and back again: an incremental C++ modules design. @zygoloid's best hobbit face! #CppCon Don't throw them in… https://twitter.com/i/web/status/779081618279374848
lol
 
hmm
just noticed it's super obvious when a new character is introduced and immediately their friend gives their full name
it's like, "Hi mr main character! Let's tell everybody that you're super important"
 
Richard tried to make the audience try to explain ODR. lol
 
10:30 PM
@Mysticial is it possible to tell gcc that here is a barrier beyond which you may not reorder code?
trying to get IACA to work, but gcc is being mean
 
IACA?
 
I've used it in the past to analyze dependency paths
@Mysticial IIRC you recommended it to me
 
Wasn't me.
@orlp The answer is yes, but only at the memory access level.
You can do that either via atomics or inline assembly clobber.
 
there are memory fence intrinsics iirc
 
Xeo
10:55 PM
@Griwes I hope all the videos are uploaded soon.
The two so far (Bjarne's keynote and the committee question round) were nice.
I especially liked the 5 words restriction in the second one, at the end. Chandler killed that.
 
11:27 PM
@Puppy Insurgency, Squad
 
The keynote would've been good if Bjarne didn't spend so much time bashing the committee for no reason. :P
 
Some of the reasons were mentioned
 
11:46 PM
@Puppy If you're looking for gaems, I've been playing subnautica. Gorgeous and a bit scary at times. Progress is coming along well on it and the dev team is great at integrating feedback
 
Alright, back home. The trunk build without the placement new's lasted the full 8 hours. Row hammer time!
 
@Mysticial Can't touch this.
 

« first day (2168 days earlier)      last day (2791 days later) »