32
CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 1 Advanced Computer Architecture 12. Thread Level Parallelism: Interconnection Network Ver. 2020-01-23a Fiscal Year 2019 Course number: CSC.T433 School of Computing, Graduate major in Computer Science www.arch.cs.titech.ac.jp/lecture/ACA/ Room No.W936 Mon 13:20-14:50, Thr 13:20-14:50 Kenji Kise, Department of Computer Science kise _at_ c.titech.ac.jp

CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

  • Upload
    others

  • View
    39

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 1

Advanced Computer Architecture

12. Thread Level Parallelism: Interconnection Network

Ver. 2020-01-23aFiscal Year 2019

Course number: CSC.T433School of Computing, Graduate major in Computer Science

www.arch.cs.titech.ac.jp/lecture/ACA/Room No.W936Mon 13:20-14:50, Thr 13:20-14:50

Kenji Kise, Department of Computer Sciencekise _at_ c.titech.ac.jp

Page 2: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 2

Key components of many-core processors

• Interconnection network

• connecting many modules on a chip achieving high throughput and low latency

• Main memory and caches

• Caches are used to reduce latency and to lower network traffic

• A parallel program has private data and shared data

• New issues are cache coherence and memory consistency

• Core

• High-performance superscalarprocessor providing a hardware mechanism to support thread synchronization

System

Chip

Interconnection network

Main memory (DRAM) I/O

Core Core Core Core

Proc1 Proc2 Proc4

Caches Caches Caches

Proc3

Caches

Page 3: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 3

A Typical computer System

Processor

Cache

MainMemory

I/OController

Disk

I/OController

I/OController

Graphics Network

Interrupts

Disk

Memory - I/O Bus

Page 4: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 4

Bus Network

• N processors, 1 switch ( ), 1 link (the bus)

• Only 1 simultaneous transfer at a time

• NB (best case) = link (bus) bandwidth x 1

• BB (worst case) = link (bus) bandwidth x 1

• All processors can snoop the bus

Processor node

Bidirectional

network switch

Page 5: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 5

Performance metrics of interconnection network

• Network cost• number of links on a switch to connect to the network (plus

one link to connect to the processor)

• width in bits per link, length of link

• number of switches

• Network bandwidth (NB) • represents the best case

• bandwidth of each link x number of links

• Bisection bandwidth (BB)• represents the worst case

• divide the machine in two parts, each with half the nodes and sum the bandwidth of the links that cross the dividing line

Page 6: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 6

Crossbar (Xbar) Network

• N processors, N2 switches (unidirectional), 2 links/switch, N2 links

• N simultaneous transfers

• NB = link bandwidth x N (best case)

• BB = link bandwidth x N (worst case)

A symbol of Xbar

Page 7: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 7

Mesh Network

• N processors, N switches, 4 links/switch, N x (N1/2 – 1) links

• N simultaneous transfers

• NB = link bandwidth x 2N (best case)

• BB = link bandwidth x 2N1/2 (worst case)

N = 16N = 4

Page 8: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 8

Intel Single-Chip Cloud Computer (2009)

• To research multi-core processors and parallel processing.

Intel Single-Chip Cloud Computer (48 Core)

Page 9: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 9

Intel Skylake-X, Core i9-7980XE, 2017

• 18 core

Page 10: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 10

Bus vs. Networks on Chip (NoC) of mesh topology

intersection

Page 11: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11

Packet organization (Flit encoding)

• A flit (flow control unit or flow control digit) is a link-level atomic piece that forms a network packet.

• A packet has one head flit and some body flits.

• For simplicity, assume that a packet has only one flit.

• Later we see a packet which has some flits.

• Each flit has typical three fields:

• Payload (data)

• Route information

• Virtual channel identifier (VC)

VCRoute infoFlit Payload

Packet (tag + data)

Page 12: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 12

Typical NoC architecture of mesh topology

• NoC requirements: low latency, high throughput, low cost

• Packet based data transmission via NoC routers and XY-dimension order routing

PM: Processing Module or Core, R: Router

Packet(tag + data)

R

PM0, 2

R

PM1, 2

R

PM2, 2

R

PM3, 2

R

PM0, 1

R

PM1, 1

R

PM2, 1

R

PM3, 1

R

PM0, 0

R

PM1, 0

R

PM2, 0

R

PM3, 0

R

PM0, 3

R

PM1, 3

R

PM2, 3

R

PM3, 3

x

y

Page 13: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 13

Routing

• XY dimension order routing (DOR), YX DOR

Page 14: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 14

Simple NoC router architecture

• Routing computation for XY-dimension order

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X

N

E

S

W

Node (3, 3)

Packet from node (1, 3) to node (3, 1)

NoC router

Page 15: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 15

Simple NoC router architecture

• Buffering and arbitration• time stamp based, round robin, etc.

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X

N

E

S

W

Page 16: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 16

Simple NoC router architecture

• Flow control

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X

N

E

S

W

N (Y-)

South router

FIFO full?

Page 17: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 17

Simple NoC router architecture

• Problem: Head-of-line (HOL) blocking

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X

N

E

S

W

N (Y-)

South router

FIFO full?

FIFO

Page 18: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 18

Two (physical) networks to mitigate HOL ?

Simple NoC router

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X FIFO full

HOL blocking

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X

HOL blocking

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X FIFO full

HOL blocking

Page 19: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 19

Datapath of Virtual Channel (VC) NoC router

• To mitigate head-of-line (HOL) blocking, virtual channels are used

N (Y-)

E (X+)

S (Y+)

W (X-)

VC0

VC1

VC2

VC0

VC1

VC2

VC0

VC1

VC2

VC0

VC1

VC2

N (Y-)

E (X+)

S (Y+)

W (X-)

X

VC0

VC1

VC2

PM(Module)

PM(Module)

FIFO full

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

N (Y-)

E (X+)

S (Y+)

W (X-)

PM(Module)

X

FIFO full

HOL blocking

VC NoC routerSimple NoC router

Page 20: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 20

Pipelining the NoC router microarchitecture

IB

IB

IB

RC

IB

SA

IB

IB

ST

ST

IB IB ST

IB IB ST

OB

OB

OB

OB

Head flit

Body flit

Body flit

Body flit

Routing Control Unit

HeaderFlit

Forw.Table

Cro

ssBar

Crossbar Control

Stage 1 Stage 2 Stage 3 Stage 4 Stage 5

ArbitrationUnit

Output Port #

IB (Input Buffering) RC (Route Computation)SA (Switch Arb)- VCA (VC Arb) -

ST (Switch Trasv) OB (Output Buffering)

Input buffers

Input buffers

DEM

UX

Physi

cal

channel

Lin

kContr

ol

Lin

kContr

ol

Physi

cal

channel

MU

X

DEM

UX M

UX

Output buffers

Lin

kContr

ol

Output buffers

Lin

kContr

ol

Physi

cal

channel

Physi

cal

channel

DEM

UX M

UX

DEM

UX M

UX

“A Delay Model and Speculative Architecture for Pipelined Routers,” L. S. Peh and W. J. Dally,Proc. of the 7th Int’l Symposium on High Performance Computer Architecture, January, 2001.

Page 21: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 21

Packet organization (Flit encoding)

• A flit (flow control unit or flow control digit) is a link-level atomic piece that forms a network packet.

• A packet has one head flit and some body flits.

• Each flit has typical three fields:

• payload(data) or route information(tag)

• flit type : head, body, tail, etc.

• virtual channel identifier

VC Type Route info

VC Type Payload

Head flit

Body flit

Head and body flit formats

Packet (tag + data)

Head flit

Body flit

Body flit

Body flit

Head flit

Body flit

Body flit

Tail flit

Page 22: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 22

Bus vs. Networks on Chip (NoC) of mesh topology

FIFO

Packet(tag + data)

Distributed system

intersection

Page 23: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 23

Bus vs. Networks on Chip (NoC) of mesh topology

Virtual Channel

To mitigate head-of-line (HOL) blocking

Page 24: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 24

Key components of many-core processors

• Interconnection network

• connecting many modules on a chip achieving high throughput and low latency

• Main memory and caches

• Caches are used to reduce latency and to lower network traffic

• A parallel program has private data and shared data

• New issues are cache coherence and memory consistency

• Core

• High-performance superscalarprocessor providing a hardware mechanism to support thread synchronization

System

Chip

Interconnection network

Main memory (DRAM) I/O

Core Core Core Core

Proc1 Proc2 Proc4

Caches Caches Caches

Proc3

Caches

Page 25: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 25

Average packet latency of mesh NoCs

• 5 stage router pipeline

• Uniform traffic (destination nodes are selected randomly)

8x8 NoC 64x64 NoC (4096 nodes)

Thiem Van Chu, Myeonggu Kang, Shi FA and Kenji Kise: Enhanced Long Edge First Routing Algorithm and Evaluation in Large-Scale Networks-on-Chip, IEEE 11th International Symposium on Embedded Multicore/Many-core Systems-on-Chip, (September 2017).

Saturation

Page 26: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 26

2D and 3D Mesh / Torus Network

2D Mesh Torus 3D Mesh

Page 27: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 27

Fat Tree (1)

• Trees are good structures. People in CS use them all the time. Suppose we wanted to make a tree network.

• Any time A wants to send to C, it ties up the upper links, so that B can't send to D.

• The bisection bandwidth on a tree is horrible - 1 link, at all times

• The solution is to 'thicken' the upper links.

• More links as the tree gets thicker increases the bisection bandwidth

C DA B

N = 4

Page 28: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 28

Fat Tree

• N processors, log(N-1) x logN switches, 2 up + 4 down = 6 links/switch, N x logN links

• N simultaneous transfers

• NB = link bandwidth x N log N

• BB = link bandwidth x 4

N = 4 N = 8

Page 29: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 29

Ring Network

• N processors, N switches, 2 links/switch, N links

• N simultaneous transfers

• NB (best case) = link bandwidth x N

• BB (worst case) = link bandwidth x 2

• If a link is as fast as a bus, the ring is only twice as fast as a bus in the worst case, but is N times faster in the best case

Page 30: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 30

Cell Broadband Engine (2005)

• Cell Broadband Engine (2005)• 8 core (SPE) + 1 core (PPE)

• each SPE has 256KB memory

• PS3, IBM Roadrunner (12k cores)

Diagram created by IBM to promote the CBEP, ©2005 from WIKIPEDIA

PlayStation3from PlaySation.com (Japan)

IEEE Micro, Cell Multiprocessor Communication Network: Built for Speed

Page 31: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 31

Intel Xeon Phi (2012)

Page 32: CSC.T433 Advanced Computer Architecture · CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 11 Packet organization (Flit encoding) • A flit (flow

CSC.T433 Advanced Computer Architecture, Department of Computer Science, TOKYO TECH 32

Epiphany-V: A 1024 core 64-bit RISC system-on-chip