Advanced Computer Architecture 5MD00 / 5Z033 SMT Simultaneously Multi-Threading Henk Corporaal TUEindhoven.

Slides:



Advertisements
Similar presentations
CS136, Advanced Architecture Limits to ILP Simultaneous Multithreading.
Advertisements

CPE 731 Advanced Computer Architecture ILP: Part V – Multiple Issue Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of.
Microprocessor Microarchitecture Multithreading Lynn Choi School of Electrical Engineering.
/ Computer Architecture and Design Instructor: Dr. Michael Geiger Summer 2014 Lecture 6: Speculation.
1 Digital Equipment Corporation (DEC) PDP-1. Spacewar (below), the first video game was developed on a PDP-1. DEC PDP-8. Extremely successful. Made DEC.
CS252 Graduate Computer Architecture Lecture 11 Limits to ILP / Multithreading March 1 st, 2010 John Kubiatowicz Electrical Engineering and Computer Sciences.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Dec 5, 2005 Topic: Intro to Multiprocessors and Thread-Level Parallelism.
Limits of Instruction-Level Parallelism CS 282 – KAUST – Spring 2010 Muhamed Mudawar Original slides created by: David Patterson.
1 Lecture 10: ILP Innovations Today: ILP innovations and SMT (Section 3.5)
CS252 Graduate Computer Architecture Lecture 12 Multithreading / Vector Processing March 2 nd, 2011 John Kubiatowicz Electrical Engineering and Computer.
CSE 820 Graduate Computer Architecture Lec 9 – Limits to ILP and Simultaneous Multithreading Base on slides by David Patterson.
CPE 731 Advanced Computer Architecture Thread Level Parallelism Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of California,
CSE 502 Graduate Computer Architecture Lec 10 –Simultaneous Multithreading Larry Wittie Computer Science, StonyBrook University
8 – Simultaneous Multithreading. 2 Review from Last Time Limits to ILP (power efficiency, compilers, dependencies …) seem to limit to 3 to 6 issue for.
Simultaneous Multithreading: Maximizing On-Chip Parallelism Presented By: Daron Shrode Shey Liggett.
CPE 631: Multithreading: Thread-Level Parallelism Within a Processor Electrical and Computer Engineering University of Alabama in Huntsville Aleksandar.
Limits to ILP How much ILP is available using existing mechanisms with increasing HW budgets? Do we need to invent new HW/SW mechanisms to keep on processor.
1 Multi-core processors 12/1/09. 2 Multiprocessors inside a single chip It is now possible to implement multiple processors (cores) inside a single chip.
POLITECNICO DI MILANO Parallelism in wonderland: are you ready to see how deep the rabbit hole goes? Multithreaded and multicore processors Marco D. Santambrogio:
Hardware Multithreading. Increasing CPU Performance By increasing clock frequency By increasing Instructions per Clock Minimizing memory access impact.
Larry Wittie Computer Science, StonyBrook University and ~lw
Super computers Parallel Processing By Lecturer: Aisha Dawood.
Computer Architecture Lec 10 –Simultaneous Multithreading.
Thread Level Parallelism Since ILP has inherent limitations, can we exploit multithreading? –a thread is defined as a separate process with its own instructions.
Processor Level Parallelism. Improving the Pipeline Pipelined processor – Ideal speedup = num stages – Branches / conflicts mean limited returns after.
12/14 Multi-Hyper thread.1 Mutli-threading, Hyperthreading & Chip Multiprocessing (CMP) Beyond ILP: thread level parallelism (TLP) Multithreaded microarchitectures.
Csci 211 Computer System Architecture Limits on ILP and Simultaneous Multithreading Xiuzhen Cheng Department of Computer Sciences The George Washington.
EECS 252 Graduate Computer Architecture Lec 9 – Limits to ILP and Simultaneous Multithreading David Patterson Electrical Engineering and Computer Sciences.
Chapter 3.4: Loop-Level Parallelism and Thread-Level Parallelism
CSC 7080 Graduate Computer Architecture Lec 6 – Limits to ILP and Simultaneous Multithreading Dr. Khalaf Notes adapted from: David Patterson Electrical.
Advanced Computer Architecture pg 1 Embedded Computer Architecture 5SAI0 Chip Multi-Processors (ch 8) Henk Corporaal
On-chip Parallelism Alvin R. Lebeck CPS 220/ECE 252.
1 Chapter 3: Limits on ILP Limits to ILP (another perspective) Thread Level Parallelism Multithreading Simultaneous Multithreading Power 4 vs. Power 5.
CS203 – Advanced Computer Architecture TLP – Multithreaded Architectures.
Ch3. Limits on Instruction-Level Parallelism 1. ILP Limits 2. SMT (Simultaneous Multithreading) ECE562/468 Advanced Computer Architecture Prof. Honggang.
Advanced Pipelining 7.1 – 7.5. Peer Instruction Lecture Materials for Computer Architecture by Dr. Leo Porter is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
PipeliningPipelining Computer Architecture (Fall 2006)
Pentium 4 Deeply pipelined processor supporting multiple issue with speculation and multi-threading 2004 version: 31 clock cycles from fetch to retire,
COMP 740: Computer Architecture and Implementation
CS203 – Advanced Computer Architecture
Electrical and Computer Engineering
Limits to ILP How much ILP is available using existing mechanisms with increasing HW budgets? Do we need to invent new HW/SW mechanisms to keep on processor.
/ Computer Architecture and Design
CPE 731 Advanced Computer Architecture Thread Level Parallelism
Simultaneous Multithreading
Lynn Choi School of Electrical Engineering
Multi-core processors
Limits on ILP and Multithreading
CC 423: Advanced Computer Architecture Limits to ILP
Chapter 3: ILP and Its Exploitation
Embedded Computer Architecture 5SAI0 Chip Multi-Processors (ch 8)
/ Computer Architecture and Design
Lec 10 – Example Architectures - Simultaneous Multithreading
David Patterson Electrical Engineering and Computer Sciences
Advanced Computer Architecture 5MD00 / 5Z033 SMT Simultaneously Multi-Threading Henk Corporaal TUEindhoven.
John Kubiatowicz Electrical Engineering and Computer Sciences
Electrical and Computer Engineering
David Patterson Electrical Engineering and Computer Sciences
Advanced Computer Architecture 5MD00 / 5Z033 SMT Simultaneously Multi-Threading Henk Corporaal TUEindhoven.
Lecture on High Performance Processor Architecture (CS05162)
Limits to ILP Conflicting studies of amount
Lec 9 – Limits to ILP and Simultaneous Multithreading
CPE 631: Multithreading: Thread-Level Parallelism Within a Processor
Henk Corporaal TUEindhoven 2011
/ Computer Architecture and Design
Embedded Computer Architecture 5SAI0 Chip Multi-Processors (ch 8)
8 – Simultaneous Multithreading
Advanced Computer Architecture 5MD00 / 5Z032 SMT Simultaneously Multi-Threading Henk Corporaal TUEindhoven.
Chapter 3: Limits of Instruction-Level Parallelism
Presentation transcript:

Advanced Computer Architecture 5MD00 / 5Z033 SMT Simultaneously Multi-Threading Henk Corporaal TUEindhoven 2012

3/20/2016ACA H.Corporaal 2 Lecture overview How to achieve speedup Simultaneous Multithreading Examples –Power 4 vs. Power 5 Head to Head: VLIW vs. Superscalar vs. SMT Conclusion Book: sections 3.4 – 3.6

3/20/2016ACA H.Corporaal 3 5 ways to speed up: parallellism TLP: task level parallellism –multiple threads of control ILP: instruction level parallellism –issue (and execute) multiple instructions per cycle –Superscalar approach OLP: operation level parallellism (usually also called ILP) –multiple operations per instruction –VLIW approach DLP: data level parallellism –multiple operands per operations –SIMD / sub-word parallel / vector computing approach Pipelining: overlapped execution –every architecture following RISC principles

3/20/2016ACA H.Corporaal 4 General organization of an ILP / OLP architecture Instruction memory Instruction fetch unit Instruction decode unit FU-1 FU-2 FU-3 FU-4 FU-5 Register file Data memory CPU Bypassing network

3/20/2016ACA H.Corporaal 5 ILP / OLP limits ILP and OLP everywhere, but limited, due to: –true dependences –branch miss predictions –cache misses –architecture complexity bypass network complexity quadratic in number of FUs register file: too many ports needed issue, renaming and select logic (for a Superscalar processor; not for a VLIW)

For most apps, most execution units lie idle From: Tullsen, Eggers, and Levy, “Simultaneous Multithreading: Maximizing On-chip Parallelism, ISCA For an 8-way superscalar.

3/20/2016ACA H.Corporaal 7 Should we go Multi-Processing? In the past MP hindered by: Increase in single thread performance 50% per year –30 % by faster transistors (silicon improvements) –deeper pipelining –multi-issue: ILP –better compilers Few highly task-level parallel applications Programmers are not educated in 'parallellism'

3/20/2016ACA H.Corporaal 8 Should we go Multi-Processing? Today: –Diminishing returns for exploiting ILP –Power issues –Wiring issues (faster transistors do not help that much) –More parallel applications –Multi-core architectures hit the market In chapter 4 and we go into DLP and multi- processing, first we look at an alternative ………

3/20/2016ACA H.Corporaal 9 New Approach: Muli-Threaded Multithreading: multiple threads share the functional units of 1 processor –duplicate independent state of each thread e.g., a separate copy of register file, a separate PC –HW for fast thread switch; much faster than full process switch  100s to 1000s of clocks When to switch? –Next instruction next thread (fine grain), or –When a thread is stalled, perhaps for a cache miss, another thread can be executed (coarse grain)

3/20/2016ACA H.Corporaal 10 Fine-Grained Multithreading Switches between threads on each instruction, causing the execution of multiples threads to be interleaved Usually done in a round-robin fashion, skipping any stalled threads CPU must be able to switch threads every clock Advantage: it can hide both short and long stalls, since instructions from other threads executed when one thread stalls Disadvantage: may slow down execution of individual threads Used in e.g. Sun’s Niagara

3/20/2016ACA H.Corporaal 11 Course-Grained Multithreading Switches threads only on costly stalls, such as L2 cache misses Advantages –Relieves need to have very fast thread-switching –Doesn’t slow down thread, since instructions from other threads issued only when the thread encounters a costly stall Disadvantage: hard to overcome throughput losses from shorter stalls, due to pipeline start-up costs –Since CPU issues instructions from 1 thread, when a stall occurs, the pipeline must be emptied or frozen –New thread must fill pipeline before instructions can complete Because of this start-up overhead, coarse-grained multithreading is better for reducing penalty of high cost stalls, where pipeline refill << stall time Used in e.g. IBM AS/400

Simultaneous Multi-threading MMFX FP BRCC Cycle One thread, 8 units M = Load/Store, FX = Fixed Point, FP = Floating Point, BR = Branch, CC = Condition Codes MMFX FP BRCC Cycle Two threads, 8 units

3/20/2016ACA H.Corporaal 13 Simultaneous Multithreading (SMT) SMT: dynamically scheduled processors already has many HW mechanisms to support multithreading: –Large set of virtual registers that can be used to hold the register sets of independent threads –Register renaming provides unique register identifiers, so instructions from multiple threads can be mixed in datapath without confusing sources and destinations across threads –Out-of-order completion allows the threads to execute out of order, and get better utilization of the HW Just adding a per thread renaming table and keeping separate PCs

3/20/2016ACA H.Corporaal 14 Recall the Superscalar Concept Instruction Memory Instruction Cache Decoder Branch Unit ALU-1ALU-2 Logic & Shift Load Unit Store Unit Reorder Buffer Register File Data Cache Data Memory Reservation Stations Address Data Instruction

3/20/2016ACA H.Corporaal 15 Multithreaded Categories Time (processor cycle) SuperscalarFine-GrainedCoarse-Grained Multiprocessing Simultaneous Multithreading Thread 1 Thread 2 Thread 3 Thread 4 Thread 5 Idle slot

3/20/2016ACA H.Corporaal 16 Design Challenges in SMT Impact of fine-grained scheduling on single thread performance? –A preferred thread approach sacrifices neither throughput nor single- thread performance? –Unfortunately, with a preferred thread, the processor is likely to sacrifice some throughput, when preferred thread stalls Larger register file needed to hold multiple contexts Not affecting clock cycle time, especially in –Instruction issue - more candidate instructions need to be considered –Instruction completion - choosing which instructions to commit may be challenging Ensuring that cache and TLB conflicts generated by SMT do not degrade performance

IBM Power4 Single threaded 8 FUs 4-issue out-of-order

2 fetch (PC), 2 initial decodes 2 commits (architected register sets) IBM Power5: supports 2 threads

Power 5 data flow... Why only 2 threads? With 4, one of the shared resources (physical registers, cache, memory bandwidth) would be prone to bottleneck

3/20/2016ACA H.Corporaal 20 Changes in Power 5 to support SMT Increased associativity of L1 instruction cache and the instruction address translation buffers Added per thread load and store queues Increased size of the L2 (1.92 vs MB) and L3 caches Added separate instruction prefetch and buffering per thread Increased the number of virtual registers from 152 to 240 Increased the size of several issue queues The Power5 core is about 24% larger than the Power4 core because of the addition of SMT support

Power 5 thread performance... Relative priority of each thread controllable in hardware. For balanced operation, both threads run slower than if they “owned” the machine.

3/20/2016ACA H.Corporaal 22 ProcessorMicro architectureFetch / Issue / Execute FUClock Rate (GHz) Transis- tors Die size Power (W) Intel Pentium 4 Extreme Speculative dynamically scheduled; deeply pipelined; SMT 3/3/47 int. 1 FP M 122 mm AMD Athlon 64 FX-57 Speculative dynamically scheduled 3/3/46 int. 3 FP M 115 mm IBM Power5 (1 CPU only) Speculative dynamically scheduled; SMT; 2 CPU cores/chip 8/4/86 int. 2 FP M 300 mm 2 (est.) 80 (est.) Intel Itanium 2 Statically scheduled VLIW-style On-chip L3 cache 6/5/119 int. 2 FP M 423 mm Head to Head ILP competition

3/20/2016ACA H.Corporaal 23 Performance on SPECint2000

3/20/2016ACA H.Corporaal 24 Performance on SPECfp2000

3/20/2016ACA H.Corporaal 25 Normalized Performance: Efficiency Rank Itanium2Itanium2 PentIum4PentIum4 AthlonAthlon Power5Power5 Int/Trans 4213 FP/Trans 4213 Int/area 4213 FP/area 4213 Int/Watt 4312 FP/Watt 2431

3/20/2016ACA H.Corporaal 26 No Silver Bullet for ILP No obvious over all leader in performance The AMD Athlon leads on SPECInt performance followed by the Pentium 4, Itanium 2, and Power5 Itanium 2 and Power5, which perform similarly on SPECFP, clearly dominate the Athlon and Pentium 4 on SPECFP Itanium 2 is the most inefficient processor both for Fl. Pt. and integer code for all but one efficiency measure (SPECFP/Watt) Athlon and Pentium 4 both make good use of transistors and area in terms of efficiency, IBM Power5 is the most effective user of energy on SPECFP and essentially tied on SPECINT

3/20/2016ACA H.Corporaal 27 Limits to ILP Doubling issue rates above today’s 3-6 instructions per clock, say to 6 to 12 instructions, probably requires a processor to –issue 3 or 4 data memory accesses per cycle, –resolve 2 or 3 branches per cycle, –rename and access more than 20 registers per cycle, and –fetch 12 to 24 instructions per cycle. The complexities of implementing these capabilities is likely to mean sacrifices in the maximum clock rate –E.g, widest issue processor is the Itanium 2, but it also has the slowest clock rate, despite the fact that it consumes the most power!

3/20/2016ACA H.Corporaal 28 Limits to ILP Most techniques for increasing performance increase power consumption The key question is whether a technique is energy efficient: does it increase power consumption faster than it increases performance? Multiple issue processors techniques all are energy inefficient: –Issuing multiple instructions incurs some overhead in logic that grows faster than the issue rate grows –Growing gap between peak issue rates and sustained performance

3/20/2016ACA H.Corporaal 29 Conclusions Limits to ILP (power efficiency, compilers, dependencies …) seem to limit to 3 to 6 issue for practical options Coarse grain vs. Fine grained multihreading –Only on big stall vs. every clock cycle Simultaneous Multithreading if fine grained multithreading based on OOO (out-of-order execution) superscalar microarchitecture Itanium/EPIC is not a breakthrough in ILP Explicitly parallel (Data level parallelism or Thread level parallelism) is next step to performance What's the right balance between ILP and TLP?

3/20/2016ACA H.Corporaal 30 Classification Instruction-Level Parallelism (ILP) Data-Level Parallelism (DLP) Compile-time discovery Run-time discovery VLIW EPIC Superscalar SMT SIMD Vector Subword GPUs GPUs turn at runtime thread-level parallelism into DLP