3 ms·
Agner says that he sees no point in hyperthreading. Then he also complains that most AVX512 operations have a latency of 2 clock cycles. Those two, I think, go
by gpderetta 10y ago
Agner says that he sees no point in hyperthreading. Then he also complains that most AVX512 operations have a latency of 2 clock cycles.
Those two, I think, go hand in hand: the point is not using unused execution resources with the additional hyperthreads (thus the decode limitation), but using the other threads to fill the pipeline bubbles created by the higher latency instructions, a-la barrel processor.
edit: this of course works as KNL is aimed at throughput jobs, not anything latency sensitive.
- jandrewrogers 10y agoThis is correct, it is not possible to get peak IPC without using all the hyperthreads, by design. It is not a CPU even though it uses a CPU's ISA, so treating it as a CPU for optimization purposes is a mistake. The advantage of its microarchitecture is that if you use the hyperthreads correctly, it will run a broad range of code at close to the theoretical IPC of the silicon without too much code effort (if you understand the model). This is in contrast to CPUs, which rarely get close to their theoretical IPC no matter what you do, or GPUs, which can only run a very narrow range of codes at close to theoretical IPC. In principle it is extremely efficient in terms of operation throughput, and it isn't sensitive to what those operations are, but it requires a large number of independent operations to be in flight to do its magic hence all the hypertheads. While the architecture explicitly uses latency-hiding to get throughput, it is mostly about latency-hiding at the sub-microsecond level. As a practical matter, it shouldn't affect the perceived latency of most real-world software.
- gnufx 10y agoI've no idea in what way KNL isn't a CPU, or how optimizing for it is fundamentally different, from running one in an HPC setting. For vectorized floating point code of the sort for which we're particularly interested in these things (e.g. DGEMM), you get peak performance from a single thread/core. The design is supposed to be "balanced", and it does appear to do a reasonable job of that for the sort of code that uses the bulk of the time on our system. In some cases, Broadwell will do substantially better, of course. I don't have URLs for performance examples to hand. People mostly seem to be ignoring the potentially important additions in KNL -- the memory system and the built-in interconnect (though I don't know if the latter is available yet). Also the large core count should help by keeping more MPI communication local. I don't know of any relevant results for multi-node jobs, but 64 cores covers a fair number of the HPC jobs I see.
- nkurz 10y agoThe names Knights Corner (KNC) and Knights Landing (KNL) are easily confused. KNC was designed as a plug-in card as you describe, but the current KNL generation has standalone systems running a standard operating system. While there are differences in where the bottlenecks are (see Agner's report) you can/should/must optimize for these standalone KNL systems as you would for a CPU: http://www.hotchips.org/wp-content/uploads/hc_archives/hc27/HC27.25-Tuesday-Epub/HC27.25.70-Processors-Epub/HC27.25.710-Knights-Landing-Sodani-Intel.pdf http://www.hotchips.org/wp-content/uploads/hc_archives/hc27/...
- p1esk 10y agoWhy does he see no point in multithreading?
- gpderetta 10y agohyperthreading != multithreading. He is saying, correctly, that the core doesn't have the resources to handle more than one thread per clock cycle (like for example server class CPUs can); but KNL has hyperthreading for the opposite reason: a single thread can't normally feed the core two new instructions every clock cycle, so you need more threads to keep the core busy on those clock cycles it would be otherwise stalled. Although he dismisses it, he actually mentions the reason: 'perhaps [it is useful] for code that is limited by memory access, branch mispredictions, or long dependency chains': especially the first and the last are going to be common on code running on KNL.