Working Of Gpu

7,581 views
7,370 views

Published on

Working of a gpu, gpu pipeline, gpu architecture

2 Comments
20 Likes
Statistics
Notes
  • pls make this slide downloadable
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • can i have this file? it will help me a lot. please help.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
7,581
On SlideShare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
0
Comments
2
Likes
20
Embeds 0
No embeds

No notes for slide

Working Of Gpu

  1. 1. The Graphics Processing Unit
  2. 2. • GPU stands for Graphics Processing Unit • A GPU is the main chip inside a computer which calculates and generates the positioning of graphics on a computer screen • Today’s graphical needs requires high performance GPUs to compute the required hundreds of gigaflops (Floating point Operations Per Second) of modern day applications What is GPU?
  3. 3. Brief History of the GPU <ul><li>Descendents of early BitBLT coprocessors. </li></ul><ul><li>Interest increased in early 90’s with bitmapped graphics. </li></ul><ul><li>Games in mid 90’s drove hardware 3D. </li></ul><ul><li>Late 90’s, early 2000: we want flexibility! </li></ul>
  4. 4. Background – the problem <ul><li>Modeling physical phenomena for scientific research requires intense computation. </li></ul><ul><li>Usually this requires floating-point matrix math, which is computationally very expensive. </li></ul><ul><li>Commodity CPUs haven’t improved at remotely the same rate as the need for computational power. </li></ul>
  5. 5. “ Solutions” <ul><li>GPUs with fewer features, less power requirements, less cost. </li></ul><ul><ul><li>Integrated graphics. </li></ul></ul><ul><li>Try to actually utilize the resource. </li></ul><ul><ul><li>Graphics-intensive desktops. </li></ul></ul><ul><ul><li>General purpose processing on the GPU (GPGPU). </li></ul></ul>
  6. 6. When does “GPU=fast co-processor” work ? Real-time visualization of complex phenomena The GPU (like a fast parallel processor) can simulate physical processes like fluid flow, n-body systems, molecular dynamics
  7. 7. How has this come about ? <ul><li>Game design has become ever more sophisticated. </li></ul><ul><li>Fast GPUs are used to implement complex shader and rendering operations for real-time effects. </li></ul><ul><li>In turn, the demand for speed has led to ever-increasing innovation in card design. </li></ul><ul><li>The gaming industry has overtaken the defense, finance, oil and healthcare industries as the main driving factor for high performance processors. </li></ul>
  8. 8. What is the GPU Good at? The GPU is good at data-parallel processing The same computation executed on many data elements in parallel – low control flow overhead with high SP floating point arithmetic intensity Many calculations per memory access Currently also need high floating point to integer Ratio High floating-point arithmetic intensity and many data elements mean that memory access latency can be hidden with calculations instead of big data caches – Still need to avoid bandwidth saturation
  9. 9. GPU Architecture • GPUs contain multiple cores that utilise hardware multithreading and SIMD (Single Input, Multiple Data ). • Having multiple cores and using SIMD processing means that GPUs have ALOT of Arithmetic Logic Units (ALU) • GPUs utilize a wider SIMD width over CPUs, GPUs tend to have a width 32-64 compared to a the SIMD width of 4 chosen by CPU designers • These wider SIMD allow cores to be packed densely with ALUs
  10. 10. GPU Architecture Memory Models CPU GPU Registers Read/write Read/write Local Mem Read/write stack None Global Mem Read/write heap Read-only during computation. Write-only at end (to pre-computed address) Disk Read/write disk None
  11. 11. The Graphics Pipeline Input: Geometric model: Description of all object, surface, and light source geometry and transformations. Lightning Model: Computational description of object and light properties, interaction (reflection) Synthetic viewpoint (or camera): Eye position and viewing frustum. Raster Viewport: Pixel grid onto which image plane is mapped. Output: Colors/Intensities suitable for frame buffer display.
  12. 12. • 3D models defined in their own coordinate system (object space) • Modeling transforms orient the models within a common coordinate frame (world space) Modeling Transformations
  13. 13. Illumination (Shading) (Lighting) • Vertices lit (shaded) according to material properties, surface properties (normal) and light sources • Local lighting model (Diffuse, Ambient, Phong, etc.)
  14. 14. Viewing Transformation • Maps world space to eye space • Viewing position is transformed to origin & direction is oriented along some axis (usually z)
  15. 15. Clipping • Transform to Normalized Device Coordinates (NDC) • Portions of the object outside the view Volume (view frustum) are removed
  16. 16. Projection • The objects are projected to the 2D image place (screen space)
  17. 17. Scan Conversion (Rasterization) • Rasterizes objects into pixels • Interpolate values as we go (color, depth, etc.)
  18. 18. Visibility / Display • Each pixel remembers the closest object (depth buffer) • Almost every step in the graphics pipeline involves a change of coordinate system. Transformations are central to understanding 3D computer graphics.
  19. 19. Differences between CPU and GPU <ul><li>GPU: nearly all transistors are ALUs </li></ul><ul><li>CPU: most of the transistors are Cache </li></ul>
  20. 20. Copying to GPU memory GPU CPU Video Memory System Memory Hamiltonian (constant , drawing of curves) Input Vector (variable) Result Vector (variable)
  21. 21. Block Diagram for General PC Graphics Architecture CPU Main Memory AGP bus Geometry Data Texture Data Vertex Processor Pixel Processor Primitive Processor Frame Buffer Rasterizer
  22. 22. CPU Memory Model <ul><li>At any program point </li></ul><ul><ul><li>Allocate/free local or global memory </li></ul></ul><ul><ul><li>Random memory access </li></ul></ul><ul><ul><ul><li>Registers </li></ul></ul></ul><ul><ul><ul><ul><li>Read/write </li></ul></ul></ul></ul><ul><ul><ul><li>Local memory </li></ul></ul></ul><ul><ul><ul><ul><li>Read/write to stack </li></ul></ul></ul></ul><ul><ul><ul><li>Global memory </li></ul></ul></ul><ul><ul><ul><ul><li>Read/write to heap </li></ul></ul></ul></ul><ul><ul><ul><li>Disk </li></ul></ul></ul><ul><ul><ul><ul><li>Read/write to disk </li></ul></ul></ul></ul>
  23. 23. GPU Memory Model <ul><li>Much more restricted memory access </li></ul><ul><ul><li>Allocate/free memory only before computation </li></ul></ul><ul><ul><li>Limited memory access during computation (kernel) </li></ul></ul><ul><ul><ul><li>Registers </li></ul></ul></ul><ul><ul><ul><ul><li>Read/write </li></ul></ul></ul></ul><ul><ul><ul><li>Local memory </li></ul></ul></ul><ul><ul><ul><ul><li>Read/write </li></ul></ul></ul></ul><ul><ul><ul><li>Shared Memory </li></ul></ul></ul><ul><ul><ul><ul><li>Only available in GPGPU not Graphics pipeline </li></ul></ul></ul></ul><ul><ul><ul><li>Global memory </li></ul></ul></ul><ul><ul><ul><ul><li>Read-only during computation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Write-only at end of computation (pre-computed address) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Read/write in GPGPU world only </li></ul></ul></ul></ul><ul><ul><ul><li>Virtual Memory </li></ul></ul></ul><ul><ul><ul><ul><li>Does not exist </li></ul></ul></ul></ul><ul><ul><ul><li>Disk access </li></ul></ul></ul><ul><ul><ul><ul><li>Does not exist </li></ul></ul></ul></ul>
  24. 24. GPU Memory Model <ul><li>Where is GPU Data Stored? </li></ul><ul><ul><li>Vertex buffer </li></ul></ul><ul><ul><li>Frame buffer </li></ul></ul><ul><ul><li>Texture </li></ul></ul>Vertex Buffer Vertex Processor Rasterizer Fragment Processor Texture Frame Buffer(s)
  25. 25. <ul><li>GPGPU Applications </li></ul><ul><ul><li>Scientific computing and physical simulation </li></ul></ul><ul><ul><li>Solving PDEs </li></ul></ul><ul><ul><li>Reaction-Diffusion </li></ul></ul><ul><ul><li>Fluid and molecular dynamics </li></ul></ul><ul><ul><li>N-body simulation </li></ul></ul><ul><ul><li>Signal processing </li></ul></ul><ul><ul><li>FFT, DCT, video processing </li></ul></ul><ul><ul><li>Geometric computations </li></ul></ul><ul><ul><li>Distance computations </li></ul></ul><ul><ul><li>Collision detection </li></ul></ul><ul><ul><li>Proximity computations </li></ul></ul><ul><ul><li>Computer vision </li></ul></ul><ul><ul><li>Real-time feature tracking </li></ul></ul><ul><ul><li>Financial forecasting </li></ul></ul><ul><ul><li>Database computations </li></ul></ul>
  26. 26. Yes ! Wealth of applications Voronoi Diagrams Data Analysis Motion Planning Geometric Optimization Physical Simulation Matrix Multiplication Conjugate Gradient Sorting and Searching Force-field simulation Particle Systems Molecular Dynamics Graph Drawing Signal Processing Database queries Range queries … and graphics too !! Image Processing Radar, Sonar, Oil Exploration Finance Planning Optimization

×