fateme hajikarami spring 2012. what is gpgpu ? ◦ general-purpose computing on a graphics...
DESCRIPTION
A GPU is tailored for highly parallel operation while a CPU executes programs serially For this reason, GPUs have many parallel execution units and higher transistor counts, while CPUs have few execution units and higher clockspeeds GPUs have much deeper pipelines (several thousand stages vs for CPUs) GPUs have significantly faster and more advanced memory interfaces as they need to shift around a lot more data than CPUsTRANSCRIPT
![Page 1: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/1.jpg)
GPU ArchitectureFateme HajikaramiSpring 2012
![Page 2: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/2.jpg)
What is GPGPU?◦ General-Purpose computing on a Graphics Processing
Unit◦ Using graphic hardware for non-graphic computations
Prefect for massive parallel processing on data paralleled applications
2
GPU
![Page 3: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/3.jpg)
A GPU is tailored for highly parallel operation while a CPU executes programs serially
For this reason, GPUs have many parallel execution units and higher transistor counts, while CPUs have few execution units and higher clockspeeds
GPUs have much deeper pipelines (several thousand stages vs 10-20 for CPUs)
GPUs have significantly faster and more advanced memory interfaces as they need to shift around a lot more data than CPUs
GPU vs CPU
![Page 4: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/4.jpg)
Available Memory Bandwidth in Different Parts of the Computer System
Memory interfaces
Bandwidth Component
35 GB/sec GPU Memory Interface
8 GB/sec PCI Express Bus 6.4 GB/sec CPU Memory
Interface
![Page 5: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/5.jpg)
CPU vs. GPU - Hardware
![Page 6: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/6.jpg)
Multi-core vs. Many-core
6
CPU vs. GPU - Hardware
![Page 7: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/7.jpg)
Fastest Memory = Registers & Shared Memory
Lowest Memory = Global Memory
7
Memory Architecture
![Page 8: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/8.jpg)
![Page 9: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/9.jpg)
9
CPU & GPU Connection
![Page 10: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/10.jpg)
The GPU receives geometry information from the CPU as an input and provides a picture as an output
Let’s see how that happens
The GPU pipeline
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 11: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/11.jpg)
The host interface is the communication bridge between the CPU and the GPU
It receives commands from the CPU and also pulls geometry information from system memory
It outputs a stream of vertices in object space.
Host interface
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 12: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/12.jpg)
The vertex processing stage receives vertices from the host interface in object space and outputs them in screen space
Vertex Processing
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 13: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/13.jpg)
In this stage geometry information becomes raster information (screen space geometry is the input, pixels are the output)
Triangle setup
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 14: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/14.jpg)
A fragment is generated if and only if its center is inside the triangle
Triangle Setup
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 15: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/15.jpg)
Each fragment provided by triangle setup is fed into fragment processing as a set of attributes, which are used to compute the final color for this pixel
Fragment Processing
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 16: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/16.jpg)
Fragment colors provided by the previous stage are written to the framebuffer
Before the final write occurs, some fragments are rejected by the zbuffer, stencil and alpha tests
Memory Interface
hostinterface
vertexprocessing
trianglesetup
fragment processing
memoryinterface
![Page 17: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/17.jpg)
Vertices are transformed into “screen space”
Vertex processing
![Page 18: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/18.jpg)
Then organized into primitives that are clipped and culled…
Triangle processing
![Page 19: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/19.jpg)
Primitives are rasterized into “pixel fragments”
Rasterization
![Page 20: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/20.jpg)
Fragments are shaded to compute a color at each pixel
Fragment processing
![Page 21: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/21.jpg)
Pipeline entities
![Page 22: Fateme Hajikarami Spring 2012. What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations](https://reader036.vdocuments.mx/reader036/viewer/2022062523/5a4d1afc7f8b9ab059984391/html5/thumbnails/22.jpg)
Thanks