The Way of the GPU (based on GPGPU SIGGRAPH Course)

Size: px
Start display at page:

Download "The Way of the GPU (based on GPGPU SIGGRAPH Course)"

Transcription

1 The Way of the GPU (based on GPGPU SIGGRAPH Course) CS535 Fall 2016 Daniel G. Aliaga Department of Computer Science Purdue University

2 Computer Graphics Pipeline Geometry (this is really from 20 years ago ) Modeling Transformation Transform into 3D world coordinate system Lighting Simulate illumination and reflectance Viewing Transformation Transform into 3D camera coordinate system Clipping Clip primitives outside camera s view Projection Transform into 2D camera coordinate system Scan Conversion Draw pixels (incl. texturing, hidden surface ) Image

3 Today, we have GPUs (GPU = graphical processing unit)

4 Motivation: Computational Power Why are GPUs fast? Arithmetic intensity: the specialized nature of GPUs makes it easier to use additional transistors for computation not cache Economics: multi-billion dollar video game market is a pressure cooker that drives innovation

5 Motivation: Flexible and Precise Modern GPUs are deeply programmable Programmable pixel, vertex, video engines Solidifying high-level language support Modern GPUs support high precision 32 bit floating point throughout the pipeline High enough for many (not all) applications

6 The Problem: Difficult To Use GPUs designed for & driven by video games Programming model unusual Programming idioms tied to computer graphics Programming environment tightly constrained Underlying architectures are: Inherently parallel Rapidly evolving (even in basic feature set!) Largely secret Can t simply port CPU code!

7 Diagram of a Modern GPU Input from CPU Host interface Geometry/Vertex processing Triangle setup Pixel processing Memory Interface fast fast fast fast memory memory memory memory

8 nvidia GPU GTX Titan X GHz (i.e., mini processors) 192 gigatexels/sec fill rate 966 Gflops in matrix multiplication 5120x3200 pixels 250W power 91C max GPU temp $999

9 Modern GPU has more ALU s

10 GPU Pipeline: Transform Vertex/Geometry processor (multiple in parallel) Transform from world space to image space Compute per-primitive and per-vertex lighting

11 Rasterizer GPU Pipeline: Rasterize (typically not programmable) Convert geometric rep. (vertex) to image rep. (fragment) Fragment = image fragment Pixel + associated data: color, depth, stencil, etc. Interpolate per-vertex quantities across pixels

12 GPU Pipeline: Shade Fragment processors (multiple in parallel) Compute a color for each pixel Optionally read colors from textures (images)

13 GPU Programming Languages Many options! A while ago: Renderman cg (from NVIDIA) GLSL (GL shading Language) CUDA (more general that graphics) Lets focus first on the concept, later on the language specifics

14 Mapping Parallel Computational Concepts to GPUs

15 Mapping Parallel Computational Concepts to GPUs GPUs are designed for graphics Highly parallel tasks GPUs process independent vertices & fragments Temporary registers are zeroed No shared or static data No read-modify-write buffers Data-parallel processing GPUs architecture is ALU-heavy Multiple vertex & pixel pipelines, multiple ALUs per pipe Hide memory latency (with more computation) 15

16 Example: Simulation Grid Common GPGPU computation style Textures represent computational grids = streams Many computations map to grids Matrix algebra Image & Volume processing Physically-based simulation Global Illumination ray tracing, photon mapping, radiosity Non-grid streams can be mapped to grids 16

17 Typical Stream Computation Grid Simulation algorithm Made up of steps Each step updates entire grid Must complete before next step can begin Grid is a stream, steps are kernels Kernel applied to each stream element 17 Cloud simulation algorithm

18 e.g.: Scatter vs. Gather Grid communication Grid cells share information 18

19 Vertex Processor Fully programmable (SIMD / MIMD) Processes 4-vectors (RGBA / XYZW) Capable of scatter but not gather 19 Can change the location of current vertex Cannot read info from other vertices Can only read a small constant memory Latest GPUs: Vertex Texture Fetch Random access memory for vertices Gather (But not from the vertex stream itself)

20 Fragment Processor Fully programmable (SIMD) Processes 4-component vectors (RGBA / XYZW) Random access memory read (textures) Capable of gather but not scatter RAM read (texture fetch), but no RAM write Output address fixed to a specific pixel Typically more useful than vertex processor More fragment pipelines than vertex pipelines Direct output (fragment processor is at end of pipeline) 20

21 GPU Simulation Overview A Simulation: Its algorithm steps are fragment programs Called Computational kernels Current state is stored in textures Feedback via render to texture Question: How do we invoke computation? 21

22 Invoking Computation Must invoke computation at each pixel Just draw geometry! Most common GPGPU invocation is a full-screen quad Other Useful Analogies Rasterization = Kernel Invocation Texture Coordinates = Computational Domain Vertex Coordinates = Computational Range 22

23 Typical Grid Computation Initialize view (so that pixels:texels::1:1) glmatrixmode(gl_modelview); glloadidentity(); glmatrixmode(gl_projection); glloadidentity(); glortho(0, 1, 0, 1, 0, 1); glviewport(0, 0, outtexresx, outtexresy); For each algorithm step: Activate render-to-texture Setup input textures, fragment program Draw a full-screen quad (1x1) 23

24 Example: N-Body Simulation Brute force N = 8192 bodies N 2 gravity computations 64M force comps. / frame ~25 flops per force 10.5 fps Nyland, Harris, Prins, 17+ GFLOPs sustained in this example GP poster 24

25 Computing Gravitational Forces Each body attracts all other bodies N bodies, so N 2 forces Draw into an NxN buffer Pixel (i,j) computes force between bodies i and j Very simple fragment program More than N=2048 bodies is tricky Why? 25

26 Computing Gravitational Forces N N-body force Texture Body Position Texture j F(i,j) = gm i M j / r(i,j) 2, force(i,j) r(i,j) = pos(i) - pos(j) i j 0 i N Force is proportional to the inverse square of the distance between bodies 26

27 Computing Gravitational Forces float4 force(float2 ij : WPOS, uniform sampler2d pos) : COLOR0 { // Pos texture is 2D, not 1D, so we need to // convert body index into 2D coords for pos tex float4 icoords = getbodycoords(ij); float4 iposmass = texture2d(pos, icoords.xy); float4 jposmass = texture2d(pos, icoords.zw); float3 dir = ipos.xyz - jpos.xyz; float r2 = dot(dir, dir); dir = normalize(dir); return dir * g * iposmass.w * jposmass.w / r2; } 27

28 Computing Total Force Have: array of (i, j) forces Need: total force on each particle i Sum of each column of the force array Can do all N columns in parallel N N-body force Texture force(i,j) 0 i N This is called a Parallel Reduction 28

29 Parallel Reductions 1D parallel reduction: sum N columns or rows in parallel add two halves of texture together repeatedly... NxN Until we re left with a single row of texels Nx(N/2) Nx(N/4) Nx Requires log 2 N steps

30 Update Positions and Velocities Now we have a 1-D array of total forces One per body Update Velocity 30 u(i,t+dt) = u(i,t) + F total (i) * dt Simple pixel shader reads previous velocity and force textures, creates new velocity texture Update Position x(i, t+dt) = x(i,t) + u(i,t) * dt Simple pixel shader reads previous position and velocity textures, creates new position texture

31 Linear Algebra on GPUs Use linear algebra for VR, education, simulation, games and much more!

32 Representation Vector representation 2D textures best we can do Per-fragment vs. per-vertex operations High texture memory bandwidth Read-write access, dependent fetches 1 N 1 N

33 Representation (cont.) Dense Matrix representation treat a dense matrix as a set of column vectors again, store these vectors as 2D textures i Matrix N Vectors N N N 2D-Textures i N N 1 i N

34 Representation (cont.) Banded Sparse Matrix representation treat a banded matrix as a set of diagonal vectors i Matrix 2 Vectors N N 2 2D-Textures 1 2 N 1 2

35 Representation (cont.) Banded Sparse Matrix representation combine opposing vectors to save space i Matrix 2 Vectors N N 2 2D-Textures 1 2 N-i N 1 2

36 Operations Vector-Vector Operations Reduced to 2D texture operations Coded in vertex/fragment shaders Example: Vector1 + Vector2 Vector3 Vector 1 Vector 2 Vector 3 + Static quad TexUnit 0 TexUnit 1 Render To Texture Pass through return tex0 + tex1 Vertex Shader Pixel Shader

37 Operations (cont.) Vector-Vector Operations Reduce operation for scalar products original Texture st 1 pass nd 2 pass Reduce m x n region in fragment shader

38 The single float on GPUs Some operations generate single float values e.g. reduce... Read-back to main-mem is slow Keep single floats on the GPU as 1x1 textures

39 Operations (cont.) In depth example: Vector / Banded-Matrix Multiplication A b x =

40 Example (cont.) Vector / Banded-Matrix Multiplication A b A b x =

41 Example (cont.) Compute the result in 2 Passes Pass 1: b = A x multiply

42 Example (cont.) Compute the result in 2 Passes Pass 2: b = A shift b x multiply

43 Representation (cont.) Random sparse matrix representation Textures do not work Splitting yields highly fragmented textures Difficult to find optimal partitions Idea: encode only non-zero entries in vertex arrays Column as TexCoord 1-4 Matrix Values as TexCoord 0 Matrix Vector = Result Vertex Array 1 Vertex Array 2 Tex0 Pos Tex1-4 Tex0 Pos Tex1-4 Vector Result N = Row Index as Position N

44 Sorting Given an unordered list of elements, produce list ordered by key value Kernel: compare and swap GPUs constrained programming environment limits viable algorithms Based on Bitonic merge sort [Batcher 68] Periodic balanced sorting networks [Dowd 89]

45 Bitonic Merge Sort Overview Repeatedly build bitonic lists and then sort them Bitonic list is two monotonic lists concatenated together, one increasing and one decreasing. List A: (3, 4, 7, 8) List B: (6, 5, 2, 1) List AB: (3, 4, 7, 8, 6, 5, 2, 1) monotonically increasing monotonically decreasing bitonic

46 Bitonic Merge Sort x monotonic lists: (3) (7) (4) (8) (6) (2) (1) (5) 4x bitonic lists: (3,7) (4,8) (6,2) (1,5)

47 Bitonic Merge Sort Sort the bitonic lists

48 Bitonic Merge Sort x monotonic lists: (3,7) (8,4) (2,6) (5,1) 2x bitonic lists: (3,7,8,4) (2,6,5,1)

49 Bitonic Merge Sort Sort the bitonic lists

50 Bitonic Merge Sort Sort the bitonic lists

51 Bitonic Merge Sort Sort the bitonic lists

52 Bitonic Merge Sort x monotonic lists: (3,4,7,8) (6,5,2,1) 1x bitonic list: (3,4,7,8, 6,5,2,1)

53 Bitonic Merge Sort Sort the bitonic list

54 Bitonic Merge Sort Sort the bitonic list

55 Bitonic Merge Sort Sort the bitonic list

56 Bitonic Merge Sort Sort the bitonic list

57 Bitonic Merge Sort Sort the bitonic list

58 Bitonic Merge Sort Done!

59 Bitonic Merge Sort Summary Separate rendering pass for each set of swaps O(log 2 n) passes Each pass performs n compare/swaps Total compare/swaps: O(n log 2 n) Limitations of GPU cost us factor of log n over best CPUbased sorting algorithms

60 Database and Streaming on GPUs Utilize graphics processors for fast computation of common database operations Conjunctive selections Aggregations Semi-linear queries Essential components 60

61 Basic DB Operations Basic SQL query» Select A» From T» Where C A= attributes or aggregations (SUM, COUNT, MAX etc) T=relational table C= Boolean Combination of Predicates (using operators AND, OR, NOT) 61

62 Database Operations Predicates a i op constant or a i op a j op: <,>,<=,>=,!=, =, TRUE, FALSE Boolean combinations Conjunctive Normal Form (CNF) Aggregations COUNT, SUM, MAX, MEDIAN, AVG 62

63 Predicate Evaluation a i op constant (d) Copy the attribute values a i into depth buffer Specify the comparison operation used in the depth test Draw a screen filling quad at depth d and perform the depth test 63

64 a i op d If ( a i op d )pass fragment Else reject fragment P Screen d 64

65 Predicate Evaluation CPU implementation Intel compiler 7.1 with SIMD optimizations 65

66 Predicate Evaluation a i op a j Equivalent to (a i a j ) op 0 Semi-linear queries Defined as linear combination of attribute values compared against a constant Linear combination is computed as a dot product of two vectors s i ai Utilize the vector processing capabilities of GPUs 66

67 67 Semi-linear Query

68 Boolean Combination CNF: (A 1 AND A 2 AND AND A k ) where A i = (B i 1 OR B i 2 OR OR B i mi ) Performed using stencil test recursively C 1 = (TRUE AND A 1 ) = A 1 C i = (A 1 AND A 2 AND AND A i ) = (C i-1 AND A i ) Different stencil values are used to code the outcome of C i Positive stencil values pass predicate evaluation Zero fail predicate evaluation 68

69 A 1 AND A 2 A 2 = (B 2 1 OR B 2 2 OR B 2 3 ) B 2 3 A 1 B 2 2 B

70 A 1 AND A 2 Stencil value = 1 A 1 70

71 A 1 AND A 2 TRUE AND A 1 Stencil value = 0 Stencil value = 1 A 1 71

72 A 1 AND A 2 Stencil = 0 Stencil=2 B 2 2 Stencil = 1 A 1 Stencil=2 B 2 3 Stencil=2 B

73 A 1 AND A 2 Stencil = 0 Stencil=2 B 2 2 Stencil = 1 A 1 Stencil=2 B 2 3 Stencil=2 B

74 A 1 AND A 2 Stencil = 2 A 1 AND B 2 2 Stencil = 0 Stencil=2 A 1 AND B 2 3 Stencil=2 A 1 AND B

75 Aggregations COUNT, MAX, MIN, SUM, AVG These can be efficiently implemented as well! 75

76 Geometric Computations Well studied Computer graphics, computational geometry etc. Widely used in games, simulations, virtual reality applications 76

77 GPUs: Geometric Computations Used for geometric applications Minkowski sums [Kim et al. 02] CSG rendering [Goldfeather et al. 89, Rossignac et al. 90] Voronoi computation [Hoff et al. 01, 02, Sud et al. 04] Isosurface computation [Pascucci 04] Map simplification [Mustafa et al. 01] 77

78 Collision Detection Pointers: Overview Collision Detection: CULLIDE Inter- and Intra-Object Collision Detection: Quick-CULLIDE Reliable Collision Detection: FAR Analysis 78

79 Geometry processing on GPUs so far: GPGPU limited to texture output new APIs allow geometry generation on GPU

80 Examples Particles Fluid Simulation 3D Smoke & Fire Grid displacement Water Simulation 3D Water Surfaces

81 Examples Particles Fluid Simulation 3D Smoke & Fire Water Simulation Grid displacement 3D Water Surfaces Point Compression Point Decompression Point Rendering

82 High Level Shading Languages Cg, HLSL, & OpenGL Shading Language Cg: HLSL: rs.asp OpenGL Shading Language: ex.html 82

83 GPGPU Languages Why do want them? Make programming GPUs easier! Don t need to know OpenGL, DirectX, or ATI/NV extensions Simplify common operations Focus on the algorithm, not on the implementation 83

84 Compilers: CGC & FXC HLSL and Cg are syntactically almost identical Exception: Cg 1.3 allows shader interfaces, unsized arrays Command line compilers Microsoft s FXC.exe Compiles to DirectX vertex and pixel shader assembly only fxc /Tps_2_0 myshader.hlsl NVIDIA s CGC.exe Compiles to everything cgc -profile ps_2_0 myshader.cg Can generate very different assembly! Driver will recompile code Compliance may vary

85 Babelshader Converts between DirectX pixel shaders and OpenGL shaders Allows OpenGL programs to use DirectX HLSL compilers to compile programs into ARB or fp30 assembly. Enables fair benchmarking competition between the HLSL compiler and the Cg compiler on the same platform with the same demo and driver. Example Conversion Between Ps2.0 and ARB 85

86 printf Debugging MOV suspect register to output Comment out anything else writing to output Scale and bias as needed Recompile Display/readback frame buffer Check values Repeat until error is (hopefully) found

87 printf Debugging Examples

88 printf Debugging Examples

89 printf Debugging Examples

90 printf Debugging Examples

91 Ideal Fragment Program Debugger Automate printf debugging Intuitive and easy to use interface Features over performance Debuggers don t need to be fast Should still be interactive Easy to add to existing apps And remove Touch as little GPU state as possible Report actual hardware values No software simulations!

92 Data Parallel Computing Instruction-Level Parallelism Data-Level Parallelism

93 A really naïve shader frag2frame Smooth(vert2frag IN, uniform samplerrect Source : texunit0, uniform samplerrect Operator : texunit1, uniform samplerrect Boundary : texunit2, uniform float4 params) { frag2frame OUT; float2 center = IN.TexCoord0.xy; float4 U = f4texrect(source, center); // Calculate Red-Black (odd-even) masks float2 intpart; float2 place = floor(1.0f - modf(round(center + float2(0.5f, 0.5f)) / 2.0f, intpart)); float2 mask = float2((1.0f-place.x) * (1.0f-place.y), place.x * place.y); if (((mask.x + mask.y) && params.y) (!(mask.x + mask.y) &&!params.y)) { float2 offset = float2(params.x*center.x - 0.5f*(params.x-1.0f), params.x*center.y - 0.5f*(params.x-1.0f));... float4 neighbor = float4(center.x - 1.0f, center.x + 1.0f, center.y - 1.0f, center.y + 1.0f); float central = -2.0f*(O.x + O.y); } float poisson = ((params.x*params.x)*u.z + (-O.x * f1texrect(source, float2(neighbor.x, center.y)) + -O.x * f1texrect(source, float2(neighbor.y, center.y)) + -O.y * f1texrect(source, float2(center.x, neighbor.z)) + -O.z * f1texrect(source, float2(center.x, neighbor.w)))) / O.w; OUT.COL.x = poisson; }... return OUT;

94 A really naïve shader frag2frame Smooth(vert2frag IN, uniform samplerrect Source : texunit0, uniform samplerrect Operator : texunit1, uniform samplerrect Boundary : texunit2, uniform float4 params) { frag2frame OUT; float2 center = IN.TexCoord0.xy; float4 U = f4texrect(source, center); // Calculate Red-Black (odd-even) masks float2 intpart; float2 place = floor(1.0f - modf(round(center + float2(0.5f, 0.5f)) / 2.0f, intpart)); float2 mask = float2((1.0f-place.x) * (1.0f-place.y), place.x * place.y); if (((mask.x + mask.y) && params.y) (!(mask.x + mask.y) &&!params.y)) { float2 offset = float2(params.x*center.x - 0.5f*(params.x-1.0f), params.x*center.y - 0.5f*(params.x-1.0f));... float4 neighbor = float4(center.x - 1.0f, center.x + 1.0f, center.y - 1.0f, center.y + 1.0f); float central = -2.0f*(O.x + O.y); } float poisson = ((params.x*params.x)*u.z + (-O.x * f1texrect(source, float2(neighbor.x, center.y)) + -O.x * f1texrect(source, float2(neighbor.y, center.y)) + -O.y * f1texrect(source, float2(center.x, neighbor.z)) + -O.z * f1texrect(source, float2(center.x, neighbor.w)))) / O.w; OUT.COL.x = poisson; }... return OUT;

95 Instruction-Level Parallelism float2 offset = float2(params.x*center.x - 0.5f*(params.x-1.0f), params.x*center.y - 0.5f*(params.x-1.0f)); float4 neighbor = float4(center.x - 1.0f, center.x + 1.0f, center.y - 1.0f, center.y + 1.0f);

96 Instruction-Level Parallelism float2 offset = center.xy - 0.5f; offset = offset * params.xx + 0.5f; // MADR is cool too one // cycle, two flops float4 neighbor = center.xxyy + float4(-1.0f,1.0f,-1.0f,1.0f);

97 Data-Level Parallelism Pack scalar data into RGBA in texture memory

98 Computational Frequency Think of your CPU program and your vertex and fragment programs as different levels of nested looping.... foreach tri in triangles { // run the vertex program on each vertex v1 = process_vertex(tri.vertex1); v2 = process_vertex(tri.vertex2); v3 = process_vertex(tri.vertex2); }... // assemble the vertices into a triangle assembledtriangle = setup_tri(v1, v2, v3); // rasterize the assembled triangle into [0..many] fragments fragments = rasterize(assembledtriangle); // run the fragment program on each fragment foreach frag in fragments { outbuffer[frag.position] = process_fragment(frag); }

99 Computational Frequency Branches Avoid these, especially in the inner loop i.e., the fragment program.

100 Computational Frequency Static branch resolution write several variants of each fragment program to handle boundary cases eliminates conditionals in the fragment program equivalent to avoiding CPU inner-loop branching case 1: no boundaries case 2: accounts for boundaries

101 Computational Frequency Dynamic branching Use only when needed Good perf requires spatial coherence in branching

102 Computational Frequency Precompute Precompute Precompute

103 Computational Frequency Precompute texture coordinates Take advantage of under-utilized hardware vertex processor rasterizer Reduce instruction count at the per-fragment level Avoid lookups being treated as texture indirections

104 Memory Hierarchy CPU and GPU Memory Hierarchy Disk CPU Main Memory CPU Caches GPU Video Memory CPU Registers GPU Caches GPU Constant Registers GPU Temporary Registers 104

105 CPU Memory Model At any program point 105 Allocate/free local or global memory Random memory access Registers Read/write Local memory Read/write to stack Global memory Disk Read/write to heap Read/write to disk

106 GPU Memory Model Much more restricted memory access 106 Allocate/free memory only before computation Limited memory access during computation (kernel) Registers Read/write Local memory Does not exist Global memory Read-only during computation Write-only at end of computation (pre-computed address) Disk access

107 GPU Memory Model Where is GPU Data Stored? Vertex buffer Frame buffer Texture VS 3.0 GPUs Texture Vertex Buffer Vertex Processor Rasterizer Fragment Processor Frame Buffer(s)

108 Glift: Goal A template for simple creation and efficient use of randomaccess GPU data structures for graphics and GPGPU programming Contributions Abstraction for GPU data structures The template library 108

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) ME 290-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 2009 Lecture 7 Outline Last time Visibility Shading Texturing Today Texturing continued

More information

General-Purpose Computation on Graphics Hardware

General-Purpose Computation on Graphics Hardware General-Purpose Computation on Graphics Hardware Welcome & Overview David Luebke NVIDIA Introduction The GPU on commodity video cards has evolved into an extremely flexible and powerful processor Programmability

More information

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) ME 290-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 2009 Lecture 7 Outline Last time Visibility Shading Texturing Today Texturing continued

More information

CS8803SC Software and Hardware Cooperative Computing GPGPU. Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology

CS8803SC Software and Hardware Cooperative Computing GPGPU. Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology CS8803SC Software and Hardware Cooperative Computing GPGPU Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology Why GPU? A quiet revolution and potential build-up Calculation: 367

More information

Query Processing on GPUs

Query Processing on GPUs Query Processing on GPUs Graphics Processor Overview Mapping Computation to GPUs Database and data mining applications Database queries Quantile and frequency queries External memory sorting Scientific

More information

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) ME 90-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 009 Lecture Outline Last time Frame buffer operations GPU programming intro Linear algebra

More information

GPU Memory Model. Adapted from:

GPU Memory Model. Adapted from: GPU Memory Model Adapted from: Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Gary J. Katz, University

More information

CS427 Multicore Architecture and Parallel Computing

CS427 Multicore Architecture and Parallel Computing CS427 Multicore Architecture and Parallel Computing Lecture 6 GPU Architecture Li Jiang 2014/10/9 1 GPU Scaling A quiet revolution and potential build-up Calculation: 936 GFLOPS vs. 102 GFLOPS Memory Bandwidth:

More information

Graphics Processing Unit Architecture (GPU Arch)

Graphics Processing Unit Architecture (GPU Arch) Graphics Processing Unit Architecture (GPU Arch) With a focus on NVIDIA GeForce 6800 GPU 1 What is a GPU From Wikipedia : A specialized processor efficient at manipulating and displaying computer graphics

More information

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 17) Read (required): GLSL book, chapter 4 (The OpenGL Programmable

More information

Graphics Hardware. Instructor Stephen J. Guy

Graphics Hardware. Instructor Stephen J. Guy Instructor Stephen J. Guy Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability! Programming Examples Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability!

More information

GPGPU: Beyond Graphics. Mark Harris, NVIDIA

GPGPU: Beyond Graphics. Mark Harris, NVIDIA GPGPU: Beyond Graphics Mark Harris, NVIDIA What is GPGPU? General-Purpose Computation on GPUs GPU designed as a special-purpose coprocessor Useful as a general-purpose coprocessor The GPU is no longer

More information

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics Why GPU? Chapter 1 Graphics Hardware Graphics Processing Unit (GPU) is a Subsidiary hardware With massively multi-threaded many-core Dedicated to 2D and 3D graphics Special purpose low functionality, high

More information

GPU Computation Strategies & Tricks. Ian Buck NVIDIA

GPU Computation Strategies & Tricks. Ian Buck NVIDIA GPU Computation Strategies & Tricks Ian Buck NVIDIA Recent Trends 2 Compute is Cheap parallelism to keep 100s of ALUs per chip busy shading is highly parallel millions of fragments per frame 0.5mm 64-bit

More information

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1 X. GPU Programming 320491: Advanced Graphics - Chapter X 1 X.1 GPU Architecture 320491: Advanced Graphics - Chapter X 2 GPU Graphics Processing Unit Parallelized SIMD Architecture 112 processing cores

More information

Sorting and Searching. Tim Purcell NVIDIA

Sorting and Searching. Tim Purcell NVIDIA Sorting and Searching Tim Purcell NVIDIA Topics Sorting Sorting networks Search Binary search Nearest neighbor search Assumptions Data organized into D arrays Rendering pass == screen aligned quad Not

More information

The GPGPU Programming Model

The GPGPU Programming Model The Programming Model Institute for Data Analysis and Visualization University of California, Davis Overview Data-parallel programming basics The GPU as a data-parallel computer Hello World Example Programming

More information

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal Graphics Hardware, Graphics APIs, and Computation on GPUs Mark Segal Overview Graphics Pipeline Graphics Hardware Graphics APIs ATI s low-level interface for computation on GPUs 2 Graphics Hardware High

More information

The Problem: Difficult To Use. Motivation: The Potential of GPGPU CGC & FXC. GPGPU Languages

The Problem: Difficult To Use. Motivation: The Potential of GPGPU CGC & FXC. GPGPU Languages Course Introduction GeneralGeneral-Purpose Computation on Graphics Hardware Motivation: Computational Power The GPU on commodity video cards has evolved into an extremely flexible and powerful processor

More information

What s New with GPGPU?

What s New with GPGPU? What s New with GPGPU? John Owens Assistant Professor, Electrical and Computer Engineering Institute for Data Analysis and Visualization University of California, Davis Microprocessor Scaling is Slowing

More information

Graphics Hardware. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 2/26/07 1

Graphics Hardware. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 2/26/07 1 Graphics Hardware Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/26/07 1 From last time Texture coordinates Uses of texture maps reflectance and other surface parameters lighting

More information

CSE 591: GPU Programming. Introduction. Entertainment Graphics: Virtual Realism for the Masses. Computer games need to have: Klaus Mueller

CSE 591: GPU Programming. Introduction. Entertainment Graphics: Virtual Realism for the Masses. Computer games need to have: Klaus Mueller Entertainment Graphics: Virtual Realism for the Masses CSE 591: GPU Programming Introduction Computer games need to have: realistic appearance of characters and objects believable and creative shading,

More information

Data-Parallel Algorithms on GPUs. Mark Harris NVIDIA Developer Technology

Data-Parallel Algorithms on GPUs. Mark Harris NVIDIA Developer Technology Data-Parallel Algorithms on GPUs Mark Harris NVIDIA Developer Technology Outline Introduction Algorithmic complexity on GPUs Algorithmic Building Blocks Gather & Scatter Reductions Scan (parallel prefix)

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) Introduction to Computer Graphics and OpenGL Graphics Hardware Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/etri_cg/ Class Objectives Understand how GPUs have been evolved Understand

More information

Parallel Programming on Larrabee. Tim Foley Intel Corp

Parallel Programming on Larrabee. Tim Foley Intel Corp Parallel Programming on Larrabee Tim Foley Intel Corp Motivation This morning we talked about abstractions A mental model for GPU architectures Parallel programming models Particular tools and APIs This

More information

Programmable Graphics Hardware

Programmable Graphics Hardware Programmable Graphics Hardware Outline 2/ 49 A brief Introduction into Programmable Graphics Hardware Hardware Graphics Pipeline Shading Languages Tools GPGPU Resources Hardware Graphics Pipeline 3/ 49

More information

GPGPU. Peter Laurens 1st-year PhD Student, NSC

GPGPU. Peter Laurens 1st-year PhD Student, NSC GPGPU Peter Laurens 1st-year PhD Student, NSC Presentation Overview 1. What is it? 2. What can it do for me? 3. How can I get it to do that? 4. What s the catch? 5. What s the future? What is it? Introducing

More information

Spring 2009 Prof. Hyesoon Kim

Spring 2009 Prof. Hyesoon Kim Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

General Algorithm Primitives

General Algorithm Primitives General Algorithm Primitives Department of Electrical and Computer Engineering Institute for Data Analysis and Visualization University of California, Davis Topics Two fundamental algorithms! Sorting Sorting

More information

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský Real - Time Rendering Graphics pipeline Michal Červeňanský Juraj Starinský Overview History of Graphics HW Rendering pipeline Shaders Debugging 2 History of Graphics HW First generation Second generation

More information

2.11 Particle Systems

2.11 Particle Systems 2.11 Particle Systems 320491: Advanced Graphics - Chapter 2 152 Particle Systems Lagrangian method not mesh-based set of particles to model time-dependent phenomena such as snow fire smoke 320491: Advanced

More information

Shaders. Slide credit to Prof. Zwicker

Shaders. Slide credit to Prof. Zwicker Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?

More information

Automatic Tuning Matrix Multiplication Performance on Graphics Hardware

Automatic Tuning Matrix Multiplication Performance on Graphics Hardware Automatic Tuning Matrix Multiplication Performance on Graphics Hardware Changhao Jiang (cjiang@cs.uiuc.edu) Marc Snir (snir@cs.uiuc.edu) University of Illinois Urbana Champaign GPU becomes more powerful

More information

printf Debugging Examples

printf Debugging Examples Programming Soap Box Developer Tools Tim Purcell NVIDIA Successful programming systems require at least three tools High level language compiler Cg, HLSL, GLSL, RTSL, Brook Debugger Profiler Debugging

More information

Spring 2011 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim Spring 2011 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

Current Trends in Computer Graphics Hardware

Current Trends in Computer Graphics Hardware Current Trends in Computer Graphics Hardware Dirk Reiners University of Louisiana Lafayette, LA Quick Introduction Assistant Professor in Computer Science at University of Louisiana, Lafayette (since 2006)

More information

Threading Hardware in G80

Threading Hardware in G80 ing Hardware in G80 1 Sources Slides by ECE 498 AL : Programming Massively Parallel Processors : Wen-Mei Hwu John Nickolls, NVIDIA 2 3D 3D API: API: OpenGL OpenGL or or Direct3D Direct3D GPU Command &

More information

Shaders (some slides taken from David M. course)

Shaders (some slides taken from David M. course) Shaders (some slides taken from David M. course) Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture

More information

UberFlow: A GPU-Based Particle Engine

UberFlow: A GPU-Based Particle Engine UberFlow: A GPU-Based Particle Engine Peter Kipfer Mark Segal Rüdiger Westermann Technische Universität München ATI Research Technische Universität München Motivation Want to create, modify and render

More information

Why Use the GPU? How to Exploit? New Hardware Features. Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid. Semiconductor trends

Why Use the GPU? How to Exploit? New Hardware Features. Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid. Semiconductor trends Imagine stream processor; Bill Dally, Stanford Connection Machine CM; Thinking Machines Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid Jeffrey Bolz Eitan Grinspun Caltech Ian Farmer

More information

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key

More information

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies How to Work on Next Gen Effects Now: Bridging DX10 and DX9 Guennadi Riguer ATI Technologies Overview New pipeline and new cool things Simulating some DX10 features in DX9 Experimental techniques Why This

More information

Lecture 2. Shaders, GLSL and GPGPU

Lecture 2. Shaders, GLSL and GPGPU Lecture 2 Shaders, GLSL and GPGPU Is it interesting to do GPU computing with graphics APIs today? Lecture overview Why care about shaders for computing? Shaders for graphics GLSL Computing with shaders

More information

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes Last Time? Programmable GPUS Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes frame buffer depth buffer stencil buffer Stencil Buffer Homework 4 Reading for Create some geometry "Rendering

More information

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp Next-Generation Graphics on Larrabee Tim Foley Intel Corp Motivation The killer app for GPGPU is graphics We ve seen Abstract models for parallel programming How those models map efficiently to Larrabee

More information

From Brook to CUDA. GPU Technology Conference

From Brook to CUDA. GPU Technology Conference From Brook to CUDA GPU Technology Conference A 50 Second Tutorial on GPU Programming by Ian Buck Adding two vectors in C is pretty easy for (i=0; i

More information

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015 Enhancing Traditional Rasterization Graphics with Ray Tracing March 2015 Introductions James Rumble Developer Technology Engineer Ray Tracing Support Justin DeCell Software Design Engineer Ray Tracing

More information

Bringing AAA graphics to mobile platforms. Niklas Smedberg Senior Engine Programmer, Epic Games

Bringing AAA graphics to mobile platforms. Niklas Smedberg Senior Engine Programmer, Epic Games Bringing AAA graphics to mobile platforms Niklas Smedberg Senior Engine Programmer, Epic Games Who Am I A.k.a. Smedis Platform team at Epic Games Unreal Engine 15 years in the industry 30 years of programming

More information

Optimizing for DirectX Graphics. Richard Huddy European Developer Relations Manager

Optimizing for DirectX Graphics. Richard Huddy European Developer Relations Manager Optimizing for DirectX Graphics Richard Huddy European Developer Relations Manager Also on today from ATI... Start & End Time: 12:00pm 1:00pm Title: Precomputed Radiance Transfer and Spherical Harmonic

More information

ECE 571 Advanced Microprocessor-Based Design Lecture 20

ECE 571 Advanced Microprocessor-Based Design Lecture 20 ECE 571 Advanced Microprocessor-Based Design Lecture 20 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 12 April 2016 Project/HW Reminder Homework #9 was posted 1 Raspberry Pi

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

GeForce4. John Montrym Henry Moreton

GeForce4. John Montrym Henry Moreton GeForce4 John Montrym Henry Moreton 1 Architectural Drivers Programmability Parallelism Memory bandwidth 2 Recent History: GeForce 1&2 First integrated geometry engine & 4 pixels/clk Fixed-function transform,

More information

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker Rendering Algorithms: Real-time indirect illumination Spring 2010 Matthias Zwicker Today Real-time indirect illumination Ray tracing vs. Rasterization Screen space techniques Visibility & shadows Instant

More information

CSE 591/392: GPU Programming. Introduction. Klaus Mueller. Computer Science Department Stony Brook University

CSE 591/392: GPU Programming. Introduction. Klaus Mueller. Computer Science Department Stony Brook University CSE 591/392: GPU Programming Introduction Klaus Mueller Computer Science Department Stony Brook University First: A Big Word of Thanks! to the millions of computer game enthusiasts worldwide Who demand

More information

frame buffer depth buffer stencil buffer

frame buffer depth buffer stencil buffer Final Project Proposals Programmable GPUS You should all have received an email with feedback Just about everyone was told: Test cases weren t detailed enough Project was possibly too big Motivation could

More information

GPU Memory Model Overview

GPU Memory Model Overview GPU Memory Model Overview John Owens University of California, Davis Department of Electrical and Computer Engineering Institute for Data Analysis and Visualization SciDAC Institute for Ultrascale Visualization

More information

E.Order of Operations

E.Order of Operations Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged

More information

The Graphics Pipeline

The Graphics Pipeline The Graphics Pipeline Ray Tracing: Why Slow? Basic ray tracing: 1 ray/pixel Ray Tracing: Why Slow? Basic ray tracing: 1 ray/pixel But you really want shadows, reflections, global illumination, antialiasing

More information

Image Processing Tricks in OpenGL. Simon Green NVIDIA Corporation

Image Processing Tricks in OpenGL. Simon Green NVIDIA Corporation Image Processing Tricks in OpenGL Simon Green NVIDIA Corporation Overview Image Processing in Games Histograms Recursive filters JPEG Discrete Cosine Transform Image Processing in Games Image processing

More information

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI Tutorial on GPU Programming #2 Joong-Youn Lee Supercomputing Center, KISTI Contents Graphics Pipeline Vertex Programming Fragment Programming Introduction to Cg Language Graphics Pipeline The process to

More information

Portland State University ECE 588/688. Graphics Processors

Portland State University ECE 588/688. Graphics Processors Portland State University ECE 588/688 Graphics Processors Copyright by Alaa Alameldeen 2018 Why Graphics Processors? Graphics programs have different characteristics from general purpose programs Highly

More information

ECE 574 Cluster Computing Lecture 16

ECE 574 Cluster Computing Lecture 16 ECE 574 Cluster Computing Lecture 16 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 26 March 2019 Announcements HW#7 posted HW#6 and HW#5 returned Don t forget project topics

More information

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences Hardware Accelerated Volume Visualization Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences A Real-Time VR System Real-Time: 25-30 frames per second 4D visualization: real time input of

More information

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015 Enhancing Traditional Rasterization Graphics with Ray Tracing October 2015 James Rumble Developer Technology Engineer, PowerVR Graphics Overview Ray Tracing Fundamentals PowerVR Ray Tracing Pipeline Using

More information

Windowing System on a 3D Pipeline. February 2005

Windowing System on a 3D Pipeline. February 2005 Windowing System on a 3D Pipeline February 2005 Agenda 1.Overview of the 3D pipeline 2.NVIDIA software overview 3.Strengths and challenges with using the 3D pipeline GeForce 6800 220M Transistors April

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

More information

Drawing Fast The Graphics Pipeline

Drawing Fast The Graphics Pipeline Drawing Fast The Graphics Pipeline CS559 Fall 2015 Lecture 9 October 1, 2015 What I was going to say last time How are the ideas we ve learned about implemented in hardware so they are fast. Important:

More information

General Purpose computation on GPUs. Liangjun Zhang 2/23/2005

General Purpose computation on GPUs. Liangjun Zhang 2/23/2005 General Purpose computation on GPUs Liangjun Zhang 2/23/2005 Outline Interpretation of GPGPU GPU Programmable interfaces GPU programming sample: Hello, GPGPU More complex programming GPU essentials, opportunity

More information

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager Optimizing DirectX Graphics Richard Huddy European Developer Relations Manager Some early observations Bear in mind that graphics performance problems are both commoner and rarer than you d think The most

More information

Working with Metal Overview

Working with Metal Overview Graphics and Games #WWDC14 Working with Metal Overview Session 603 Jeremy Sandmel GPU Software 2014 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission

More information

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

Real-Time Graphics Architecture

Real-Time Graphics Architecture Real-Time Graphics Architecture Kurt Akeley Pat Hanrahan http://www.graphics.stanford.edu/courses/cs448a-01-fall Geometry Outline Vertex and primitive operations System examples emphasis on clipping Primitive

More information

GPGPU: Parallel Reduction and Scan

GPGPU: Parallel Reduction and Scan Administrivia GPGPU: Parallel Reduction and Patrick Cozzi University of Pennsylvania CIS 565 - Spring 2011 Assignment 3 due Wednesday 11:59pm on Blackboard Assignment 4 handed out Monday, 02/14 Final Wednesday

More information

The Rasterization Pipeline

The Rasterization Pipeline Lecture 5: The Rasterization Pipeline (and its implementation on GPUs) Computer Graphics CMU 15-462/15-662, Fall 2015 What you know how to do (at this point in the course) y y z x (w, h) z x Position objects

More information

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 2 due tomorrow at 2pm Grading window

More information

Lecture 6: Texture. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Lecture 6: Texture. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011) Lecture 6: Texture Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Today: texturing! Texture filtering - Texture access is not just a 2D array lookup ;-) Memory-system implications

More information

Lecture 13: OpenGL Shading Language (GLSL)

Lecture 13: OpenGL Shading Language (GLSL) Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 18, 2018 1/56 Motivation } Last week, we discussed the many of the new tricks in Graphics require low-level access to the Graphics

More information

Introduction to Multicore architecture. Tao Zhang Oct. 21, 2010

Introduction to Multicore architecture. Tao Zhang Oct. 21, 2010 Introduction to Multicore architecture Tao Zhang Oct. 21, 2010 Overview Part1: General multicore architecture Part2: GPU architecture Part1: General Multicore architecture Uniprocessor Performance (ECint)

More information

SHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming

SHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming SHADER PROGRAMMING Based on Jian Huang s lecture on Shader Programming What OpenGL 15 years ago could do http://www.neilturner.me.uk/shots/opengl-big.jpg What OpenGL can do now What s Changed? 15 years

More information

Using GPUs. Visualization of Complex Functions. September 26, 2012 Khaldoon Ghanem German Research School for Simulation Sciences

Using GPUs. Visualization of Complex Functions. September 26, 2012 Khaldoon Ghanem German Research School for Simulation Sciences Visualization of Complex Functions Using GPUs September 26, 2012 Khaldoon Ghanem German Research School for Simulation Sciences Outline GPU in a Nutshell Fractals - A Simple Fragment Shader Domain Coloring

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1 CS 428: Fall 2010 Introduction to Computer Graphics OpenGL primer Andrew Nealen, Rutgers, 2010 9/13/2010 1 Graphics hardware Programmable {vertex, geometry, pixel} shaders Powerful GeForce 285 GTX GeForce480

More information

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) ME 290-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 2009 Performance: Bottlenecks Sources of bottlenecks CPU Transfer Processing Rasterizer

More information

1.2.3 The Graphics Hardware Pipeline

1.2.3 The Graphics Hardware Pipeline Figure 1-3. The Graphics Hardware Pipeline 1.2.3 The Graphics Hardware Pipeline A pipeline is a sequence of stages operating in parallel and in a fixed order. Each stage receives its input from the prior

More information

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care? Where does a picture come from? Rasterization and Graphics Hardware CS559 Course Notes Not for Projection November 2007, Mike Gleicher Result: image (raster) Input 2D/3D model of the world Rendering term

More information

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image

More information

Drawing Fast The Graphics Pipeline

Drawing Fast The Graphics Pipeline Drawing Fast The Graphics Pipeline CS559 Fall 2016 Lectures 10 & 11 October 10th & 12th, 2016 1. Put a 3D primitive in the World Modeling 2. Figure out what color it should be 3. Position relative to the

More information

NVIDIA Case Studies:

NVIDIA Case Studies: NVIDIA Case Studies: OptiX & Image Space Photon Mapping David Luebke NVIDIA Research Beyond Programmable Shading 0 How Far Beyond? The continuum Beyond Programmable Shading Just programmable shading: DX,

More information

Understanding Shaders and WebGL. Chris Dalton & Olli Etuaho

Understanding Shaders and WebGL. Chris Dalton & Olli Etuaho Understanding Shaders and WebGL Chris Dalton & Olli Etuaho Agenda Introduction: Accessible shader development with WebGL Understanding WebGL shader execution: from JS to GPU Common shader bugs Accessible

More information

Lecture 25: Board Notes: Threads and GPUs

Lecture 25: Board Notes: Threads and GPUs Lecture 25: Board Notes: Threads and GPUs Announcements: - Reminder: HW 7 due today - Reminder: Submit project idea via (plain text) email by 11/24 Recap: - Slide 4: Lecture 23: Introduction to Parallel

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

More information

Squeezing Performance out of your Game with ATI Developer Performance Tools and Optimization Techniques

Squeezing Performance out of your Game with ATI Developer Performance Tools and Optimization Techniques Squeezing Performance out of your Game with ATI Developer Performance Tools and Optimization Techniques Jonathan Zarge, Team Lead Performance Tools Richard Huddy, European Developer Relations Manager ATI

More information

CS179 GPU Programming Introduction to CUDA. Lecture originally by Luke Durant and Tamas Szalay

CS179 GPU Programming Introduction to CUDA. Lecture originally by Luke Durant and Tamas Szalay Introduction to CUDA Lecture originally by Luke Durant and Tamas Szalay Today CUDA - Why CUDA? - Overview of CUDA architecture - Dense matrix multiplication with CUDA 2 Shader GPGPU - Before current generation,

More information

The Application Stage. The Game Loop, Resource Management and Renderer Design

The Application Stage. The Game Loop, Resource Management and Renderer Design 1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data

More information

DEVELOPER DAY. Vulkan Subgroup Explained Daniel Koch NVIDIA MONTRÉAL APRIL Copyright Khronos Group Page 1

DEVELOPER DAY. Vulkan Subgroup Explained Daniel Koch NVIDIA MONTRÉAL APRIL Copyright Khronos Group Page 1 DEVELOPER DAY Vulkan Subgroup Explained Daniel Koch (@booner_k), NVIDIA MONTRÉAL APRIL 2018 Copyright Khronos Group 2018 - Page 1 Copyright Khronos Group 2018 - Page 2 Agenda Motivation Subgroup overview

More information

L10 Layered Depth Normal Images. Introduction Related Work Structured Point Representation Boolean Operations Conclusion

L10 Layered Depth Normal Images. Introduction Related Work Structured Point Representation Boolean Operations Conclusion L10 Layered Depth Normal Images Introduction Related Work Structured Point Representation Boolean Operations Conclusion 1 Introduction Purpose: using the computational power on GPU to speed up solid modeling

More information

CS GPU and GPGPU Programming Lecture 8+9: GPU Architecture 7+8. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 8+9: GPU Architecture 7+8. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 8+9: GPU Architecture 7+8 Markus Hadwiger, KAUST Reading Assignment #5 (until March 12) Read (required): Programming Massively Parallel Processors book, Chapter

More information

12.2 Programmable Graphics Hardware

12.2 Programmable Graphics Hardware Fall 2018 CSCI 420: Computer Graphics 12.2 Programmable Graphics Hardware Kyle Morgenroth http://cs420.hao-li.com 1 Introduction Recent major advance in real time graphics is the programmable pipeline:

More information

Using GPUs to compute the multilevel summation of electrostatic forces

Using GPUs to compute the multilevel summation of electrostatic forces Using GPUs to compute the multilevel summation of electrostatic forces David J. Hardy Theoretical and Computational Biophysics Group Beckman Institute for Advanced Science and Technology University of

More information

high performance medical reconstruction using stream programming paradigms

high performance medical reconstruction using stream programming paradigms high performance medical reconstruction using stream programming paradigms This Paper describes the implementation and results of CT reconstruction using Filtered Back Projection on various stream programming

More information