02 Introduction to Parallel Programming Model (SIGGRAPH 2009)

02 Introduction to Parallel Programming Model (SIGGRAPH 2009)

Info iconThis preview shows pages 1–18. Sign up to view the full content.

View Full Document Right Arrow Icon
Beyond Programmable Shading 1 Introduction to Parallel Programming Models Tim Foley Stanford University
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 2 Overview Introduce three kinds of parallelism Used in visual computing Targeting throughput architectures Goals Establish basic terminology for the course Recognize idioms in your workloads Evaluate and select tools
Background image of page 2
Beyond Programmable Shading 3 Scope Games as representative application Demand high performance, visual quality Already using MC, throughput and heterogeneous HW Visibility, illumination, physics, simulation Not covering every possible approach Explicit threads, locks Message-passing/actors/CSP Transactions/REST
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 4 What goes into a game frame?
Background image of page 4
Beyond Programmable Shading 5 This. Computation graph for Battlefied: Bad Company provided by DICE
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 6 A modern game is a mix of… Data-parallel algorithms
Background image of page 6
Beyond Programmable Shading 7 A modern game is a mix of… Task-parallel algorithms and coordination
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 8 A modern game is a mix of… Standard and extended graphics pipelines Pipeline Flow Input Assembly Vertex Shading Primitive Setup Geometry Shading Rasterization Pixel Shading Output Merging
Background image of page 8
Beyond Programmable Shading 9 Data-Parallel Task-Parallel Pipeline-Parallel
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 10 Structure of this talk For each of these approaches Key idea Mental model Applicability Composition How these models combine in the real world 10
Background image of page 10
Beyond Programmable Shading 11 Caveats Turing Tar Pit Just being able to express it doesn’t make it fast! Most general model is not always best Constraints are what enable optimizations Not every model requires dedicated tools These patterns can be expressed in many languages
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 12 Data parallelism
Background image of page 12
Beyond Programmable Shading 13 Key Idea Run a single kernel over many elements Per-element computations are independent Can exploit throughput architecture well Amortize per-element cost with SIMD/SIMT Hide memory latency with lightweight threads
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 14 Mental Model Execute N independent work items aka “elements”, “fragments”, “strands”, “threads” All work items run the same program: kernel Work item uses data determined by 0 <= i < N [0, N ) is the domain of computation
Background image of page 14
Beyond Programmable Shading 15 Domain of computation Determines number and “shape” of work items Often based on input/output data structure Not required – domain and data may be decoupled Many domain “shapes” possible Regular Nested Irregular
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Beyond Programmable Shading 16 Simple Data-Parallelism Data structure Regular array Kernel Domain of computation 1D interval void k(int i) { B[i] += A[i]; } k(0) K(1) K(2) K(3) K(4) K(5) A: B: Data Program Computation
Background image of page 16
Beyond Programmable Shading 17
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 18
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/29/2010 for the course CSE 4190.410 taught by Professor Shinyeonggil during the Spring '09 term at Seoul National.

Page1 / 61

02 Introduction to Parallel Programming Model (SIGGRAPH 2009)

This preview shows document pages 1 - 18. Sign up to view the full document.

View Full Document Right Arrow Icon