{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

02 Introduction to Parallel Programming Model (SIGGRAPH 2009)

02 Introduction to Parallel Programming Model (SIGGRAPH 2009)

Info icon This 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
Image of page 1

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

View Full Document Right 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
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
Image of page 3

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

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

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

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

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

View Full Document Right 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
Image of page 8
Beyond Programmable Shading 9 Data-Parallel Task-Parallel Pipeline-Parallel
Image of page 9

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

View Full Document Right 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
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
Image of page 11

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

View Full Document Right Arrow Icon
Beyond Programmable Shading 12 Data parallelism
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
Image of page 13

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

View Full Document Right 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
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
Image of page 15

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

View Full Document Right 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
Image of page 16
Beyond Programmable Shading 17
Image of page 17

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern