Processor Architecture Stream Arithmetic Logic Unit Programming - - PowerPoint PPT Presentation

processor architecture
SMART_READER_LITE
LIVE PREVIEW

Processor Architecture Stream Arithmetic Logic Unit Programming - - PowerPoint PPT Presentation

Processor Architecture Stream Arithmetic Logic Unit Programming ALU for high-performance computing 7 8 2 Memory CS334 F09 Prof. McGuire Williams College 1 2 Multi-Processor Stream Programming Arithmetic Logic Unit Arithmetic Logic


slide-1
SLIDE 1

Stream Programming

for high-performance computing

CS334 F09

  • Prof. McGuire

Williams College

1

Processor Architecture

ALU Memory

Arithmetic Logic Unit 7 8 2

2

ALU Memory

Arithmetic Logic Unit 7

ALU

2 4 8 5 ?

ALU ALU ALU

Multi-Processor

3

Memory

Arithmetic Logic Unit 7 8

ALU ALU ALU ALU ALU

5

Stream Programming

2 4 8 9 3 5 6

4

slide-2
SLIDE 2

Stream Primitives

  • Map
  • Reduce
  • Scatter
  • Gather

(map * ‘(1 2) (3 4)) ! ‘(3 8)

“kernel” function source destination

5

Map

  • Apply a function to all

elements

  • Matrix addition
  • Audio adjustment

dst[i] = f(src[i])

(map * ‘(1 2) (3 4)) ! ‘(3 8)

6

Reduce (Filter)

  • Drop elements that

fail a predicate

  • Strip outliers
  • Parse whitespace

(filter even? ‘(1 2 3 4)) ! ‘(2 4)

7

Reduce (Fold)

  • Combine elements
  • Summation
  • Average
  • Maximum

dst = f(src[0], src[1], ..., src[n]) (foldl + 0 ‘(1 2 3 4)) ! 10

8

slide-3
SLIDE 3

Scatter (“Push”)

  • Iterate over source,

compute destination index

  • Radix, Insertion, Quick sort
  • Hash table insertion
  • Permutation
  • Rasterization

dst[ f(i) ] = src[i]

9

Gather (“Pull”)

  • Iterate over destination,

compute source index

  • Merge sort
  • Sparse matrix operations
  • Ray tracing
  • Database query

dst[i] = src[ f(i) ]

10

The Next Big Thing?

  • OpenMP - Parallel C and Fortran extensions
  • Chapel - Cray; streaming Fortran-ish
  • X10 - IBM; streaming Java
  • Fortress - Sun; Guy Steele’s Mathematica-Scheme
  • HPC, ZPL, Cilk, Titanium, UPC, Cuda, CTM, Sh, ...

11