Docsity

Parallel Platforms - Parallel Computing - Lecture Slides, Slides of Parallel Computing and Programming

Partial preview of the text

Download Parallel Platforms - Parallel Computing - Lecture Slides and more Slides Parallel Computing and Programming in PDF only on Docsity!

Parallel Computing Platforms and

Memory System Performance

2

Topics for Today

  • SIMD and MIMD control structure
  • Communication models for parallel platforms
  • Memory hierarchy and performance

4

Control Structure of Parallel Platforms

Parallelism ranges from instructions to processes

  • Processor control structure alternatives —operate under the centralized control of a single control unit, or —work independently
  • SIMD (AKA SIMT for GPUs) —Single Instruction stream - single control unit dispatches the same instruction to processors —Multiple Data streams - processors work on their own data
  • MIMD —Multiple Instruction streams - each processor has its own control control unit - each processor can execute different instructions —Multiple Data streams - processors work on their own data

5

SIMD and MIMD Processors

SIMD architecture MIMD architecture PE = Processing Element

Interconnection Network PE + control unit PE + control unit PE + control unit

PE^ Interconnection Network PE PE PE PE Global Control Unit

7 Executing a Conditional on SIMD Processors initial values conditional statement if (B == 0) then C = A else C = A/B execute “then” branch execute “else” branch

8

SIMD Examples

  • Many early parallel computers —Illiac IV, MPP, DAP, Connection Machine CM-1/2, and MasPar MP-1/
  • Today —vector units - SSE, SSE2, Altivec (Velocity Engine, VMX) 128-bit vector registers 16 8-bit chars, 8 16-bit short int, 4 32-bit ints, 4 32-bit FP variables SSE2 also operates on 2 64-bit double precision values - Intel MIC (Xeon Phi) 32 512-bit vector registers 16 32-bit FP, 8 64-bit FP —co-processors - ClearSpeed array processor (control PE + array of 96 PEs) http://www.clearspeed.com - nVidia Kepler GK110 GPGPU

SSE / SSE2 SIMD Processing

  • SSE2 data types: anything that fits into 16 bytes, e.g.,
  • Instructions operate in parallel on data in this 16 byte register —add, multiply etc.
  • Data bytes must be contiguous in memory and aligned
  • Additional instructions needed for —masking data —moving data from one part of a register to another 10 16x bytes 4x floats 2x doubles

Short Vectors (e.g., SSE): The Good and Bad

The stencil code (a) has much lower performance than the

non-stencil code (b) despite accessing 50% fewer data

elements

Figure credit: P. Sadayappan. See Henretty et al. [CC’11] 11

Stream Alignment Conflicts

13

Dimension-lifted Transformation

(a) 1D array in memory

(b) 2D view of same array

(c) Transposed 2D array brings non-interacting elements into

contiguous vectors

(d) New 1D layout after transformation

Figure credit: P. Sadayappan. See Henretty et al. [CC’11] 14 J-1D: a[i] = b[i-1] + b[i] + b[i+1]

16

  • Features —hardware multi-threading —asynchronous, overlapped I/O —extensible instruction set
  • SIMD core —poly controller —poly execution unit
  • array of 96 PEs
  • 64- and 32-bit floating point
  • 250 MHz (key to low power)
  • 128 million transistors
  • low power: ~10 Watts

SIMD: ClearSpeed MTAP Co-processor

MTAP processor Figure credit:http://www.clearspeed.com/images/arch_mtap.jpg

NVIDIA Kepler GK110 (May 2012)

  • 28nm chip, 7.1B transistors
  • 15 Streaming Multiprocessors (SMX) —192 CUDA cores - fully pipelined FP and INT units - IEEE 754-2008; fused multiply add —four warp schedulers - 32-thread groups (warp) - 4 warps issue and execute concurrently - 2 inst/warp/cycle —64 DP FP units —32 SFU —32 LS units
  • 6 64-bit memory

controllers

http://www.nvidia.com/content/PDF/kepler/NVIDIA-Kepler-GK110-Architecture-Whitepaper.pdf^17

19

SIMD vs. MIMD

  • SIMD platforms —special purpose: not well-suited for all applications —custom designed with long design cycles —less hardware: single control unit —need less memory: only 1 copy of program —today: SIMD common only for accelerators and vector units - accelerator: nVidia Kepler
  • MIMD platforms —suitable for broad range of applications —inexpensive: off-the-shelf components + short design cycle —need more memory: program and OS on each processor

20

Communication Models for Parallel Platforms

  • Two primary forms of data exchange between parallel tasks —accessing a shared data space —exchanging messages
  • Platforms that provide a shared data space = —shared-memory platforms - AKA multiprocessors
  • Platforms that support messaging = —message-passing platforms - AKA multicomputers