Docsity

GPGPU Focus: Multi-Core & Many-Core Architectures & Programming at UCF - Prof. Huiyang Zho, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
School of Electrical Engineering and Computer Science
University of Central Florida
ST: CDA 6938 Multi
ST: CDA 6938 Multi-
-Core/Many
Core/Many-
-Core Architectures and
Core Architectures and
Programming
Programming
http://csl.cs.ucf.edu/courses/CDA6938/
http://csl.cs.ucf.edu/courses/CDA6938/
Prof. Huiyang Zhou
2
Outline
Outline
• Administration
• Motivation
– Why multi-core many core processors? Why GPGPU?
• CPU vs. GPU
• The brief history of GPGPU
• An overview of AMD/ATI streaming processors and the
software development toolset (Brook+ and CAL)
• An overview of Nvidia G80 and CUDA
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download GPGPU Focus: Multi-Core & Many-Core Architectures & Programming at UCF - Prof. Huiyang Zho and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

School of Electrical Engineering and Computer Science University of Central Florida

ST: CDA 6938 Multi- ST: CDA 6938 Multi-Core/ManyCore/Many--Core Architectures andCore Architectures and

ProgrammingProgramming

http://csl.cs.ucf.edu/courses/CDA6938/http://csl.cs.ucf.edu/courses/CDA6938/

Prof. Huiyang Zhou

OutlineOutline

  • Administration
  • Motivation
    • Why multi-core many core processors? Why GPGPU?
  • CPU vs. GPU
  • The brief history of GPGPU
  • An overview of AMD/ATI streaming processors and the

software development toolset (Brook+ and CAL)

  • An overview of Nvidia G80 and CUDA

3

Description (Syllabus)Description (Syllabus)

  • High performance computing on multi-core / many-core

architectures

  • Focus:
    • Data-level parallelism, thread-level parallelism
    • How to express them in various programming models
    • Architectural features with high impact on the performance
  • Prerequisite
    • CDA5106 : Advanced Computer Architecture I
    • C programming

Description (cont.) Description (cont.)

  • Textbook
    • No required textbooks, four optional ones
    • Papers & Notes
  • Tentative grading policy
    • +/- policy will be used
    • Homework: 25%
    • Participation in discussion: 10%
    • Project: 65%
      • Including two in-class presentations
    • A:90~100 B+: 85~90 B: 80~85 B-: 75~80.

7

AssignmentsAssignments

• Homework

  • #0 “Hello world!” using emulators (running on CPU) of GPUs
  • Programming assignments (3 sets)

• Projects

  • Select one processor model from Nvidia G80, ATI streaming processors, and IBM Cell processors.
  • Select (or find your own) an application
  • Try to improve the performance using the GPU that you selected

• Cross platform comparison

Experiments Experiments

  • Lab: HEC 238 (PS3) and HEC 242 (Computers with ATI /

Nvidia Graphics cards)

9

AcknowledgementAcknowledgement

  • Some material including lecture notes are based on the

lecture notes of the following courses:

  • Programming Massively Parallel Processors (UIUC)
  • Multicore Programming Premier: Learn and Compete

Programming for the PS3 Cell Processors (MIT)

  • Multicore and GPU Programming for Video Games

(GaTech)

Computer Science at a Crossroads (D. Patterson) Computer Science at a Crossroads (D. Patterson)

  • Old CW: Uniprocessor performance 2X / 1.5 yrs
  • New CW: Power Wall + ILP Wall + Memory Wall = Brick

Wall

  • Uniprocessor performance now 2X / 5(?) yrs

⇒ Sea change in chip design: multiple “cores”

(2X processors per chip / ~ 2 years)

  • More simpler processors are more power efficient
  • The Free (performance) Lunch is over: A Fundamental

Turn Toward Concurrency in Software

  • The biggest sea change in software development since the OO revolution is knocking at the door, and its name is Concurrency (by Herb Sutter)

13

GPU vs. CPU GPU vs. CPU

G80 Die (90 nm tech.) Photo IBM Power 6 Die (65 nm tech.) Photo

IBM Power 6IBM Power 6

  • Outstanding Feature: 4.7 GHz; 2 cores with symmetric

multiprocessing (SMP) support; 8MB L2 cache

15

Inside the CPU core (CDA5106) Inside the CPU core (CDA5106)

  • Power 5 die

GPU Die (GTX280 65 nm) GPU Die (GTX280 65 nm)

19

GPU vs. CPU GPU vs. CPU

  • CPU: all these on-chip estate are used to achieve

performance improvement transparent to software

developers

  • Sequential programming model
  • Moving towards multi-core and many-core
  • GPU: more on-chip resources used for floating-point

computation

  • Requires data parallel programming model
  • Expose architecture features to software developers and software needs to explicitly taking advantage of those features to achieve high performance

Appendix A — 20^20

FIGURE A.2.1 Historical PC. VGA controller drives graphics display from framebuffer memory. Copyright © 2009 Elsevier, Inc. All rights reserved.

Appendix A — 21^21

FIGURE A.2.2 Contemporary PCs with Intel and AMD CPUs. See Chapter 6 for an explanation of the components and interconnects in this figure. Copyright © 2009 Elsevier, Inc. All rights reserved.

Appendix A — 22^22

FIGURE A.2.3 Graphics logical pipeline. Programmable graphics shader stages are blue, and fixed-function blocks are white. Copyright © 2009 Elsevier, Inc. All rights reserved.

Appendix A — 25^25

FIGURE A.3.1 Direct3D 10 graphics pipeline. Each logical pipeline stage maps to GPU hardware or to a GPU processor. Programmable shader stages are blue, fixed-function blocks are white, and memory objects are grey. Each stage processes a vertex, geometric primitive, or pixel in a streaming dataflow fashion. Copyright © 2009 Elsevier, Inc. All rights reserved.

Appendix A — 26^26

FIGURE A.3.2 GPU-rendered image. To give the skin visual depth and translucency, the pixel shader program models three separate skin layers, each with unique subsurface scattering behavior. It executes 1400 instructions to render the red, green, blue, and alpha color components of each skin pixel fragment. Copyright © 2009 Elsevier, Inc. All rights reserved.

27

Things to know for a GPU processor Things to know for a GPU processor

  • Thread execution model
    • How the threads are executed, how to synchronize threads
    • How the instructions in each/multiple thread(s) are executed
  • Memory model
    • How the memory is organized
    • Speed and Size considerations for different types of memories
    • Shared or private memory. If shared, how to ensure the memory ordering
  • Control flow handling
  • Instruction Set Architecture
  • Support:
    • Programming environment
    • Compiler, debugger, emulator, etc.

HW and SW support for GPGPUHW and SW support for GPGPU

  • Nvidia Geforce 8800 GTX vs Geforce 7800
    • Slides from the Nvidia talk given at Stanford Univ.
  • Programming models
    • CUDA
    • Brook+
    • OpenCL
    • CAL
    • Peak Stream
    • Rapid Mind