3 ms·
> How many register sets does a typical SMT processor have? Er, 2, sometimes 4 Way more of them. Pipelines are deep, and different in-flight instructions need
by Const-me 2y ago
> How many register sets does a typical SMT processor have? Er, 2, sometimes 4
Way more of them. Pipelines are deep, and different in-flight instructions need different versions of the same registers.
For example, my laptop has AMD Zen3 processor. Each core has 192 scalar physical registers, while only ~16 general-purpose scalar registers defined in the ISA. This gives 12 register sets; they are shared by both threads running on the core.
Similar with SIMD vector registers. Apparently each core has 160 32-byte vector registers. Because AVX2 ISA defines 16 vector register, this gives 10 register sets per core, again shared by 2 threads.
- xoranth 2y agoI believe the author is referring to how many logical threads/hyperthreads can a core run (for AMD and Intel, two. I believe POWER can do 8, Sparc 4). The extra physical registers are there for superscalar execution, not for SMT/hyperthreading.
- yosefk 2y agoI meant register sets visible to software. The fact that there's even more hardware not visible to software that you need for a thread to run fast just means that the cost of adding another thread is even higher
- atq2119 2y agoDepends on whether that hardware is shared between threads or not. Physical registers are usually shared.