EE , GPU Programming

Similar documents
EE 7722 GPU Microarchitecture. Offered by: Prerequisites By Topic: Text EE 7722 GPU Microarchitecture. URL:

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Graphics Hardware. Instructor Stephen J. Guy

Demo 1: Simple Dynamic Simulation

NVIDIA Parallel Nsight. Jeff Kiel

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

Spring 2011 Prof. Hyesoon Kim

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

GPGPU, 1st Meeting Mordechai Butrashvily, CEO GASS

GPUs and GPGPUs. Greg Blanton John T. Lubia

Using Graphics Chips for General Purpose Computation

EE 4702 GPU Programming

April 4-7, 2016 Silicon Valley

GPGPU, 4th Meeting Mordechai Butrashvily, CEO GASS Company for Advanced Supercomputing Solutions

Mention driver developers in the room. Because of time this will be fairly high level, feel free to come talk to us afterwards

CS 179: GPU Programming

CS535: Interactive Computer Graphics

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

Administrivia. Administrivia. Administrivia. CIS 565: GPU Programming and Architecture. Meeting

GPU Programming and Architecture: Course Overview

GPU Architecture. Alan Gray EPCC The University of Edinburgh

What Next? Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. * slides thanks to Kavita Bala & many others

Graphics Performance Analyzer for Android

WebGL. Announcements. WebGL for Graphics Developers. WebGL for Web Developers. Homework 5 due Monday, 04/16. Final on Tuesday, 05/01

Spring 2009 Prof. Hyesoon Kim

CS 220: Introduction to Parallel Computing. Introduction to CUDA. Lecture 28

! Readings! ! Room-level, on-chip! vs.!

Shaders. Slide credit to Prof. Zwicker

CIS 581 Interactive Computer Graphics (slides based on Dr. Han-Wei Shen s slides) Requirements. Reference Books. Textbook

CIS 581 Interactive Computer Graphics

Computer Science 175. Introduction to Computer Graphics lib175 time: m/w 2:30-4:00 pm place:md g125 section times: tba

Computer Graphics CS 543 Lecture 1 (Part I) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

GPGPU/CUDA/C Workshop 2012

Real-Time Support for GPU. GPU Management Heechul Yun

Hardware/Software Co-Design

ATI FirePro /FireGL Unified Driver Version Release Note

CS195V Week 1. Introduction

I expect to interact in class with the students, so I expect students to be engaged. (no laptops, smartphones,...) (fig)

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

Introduction to GPU hardware and to CUDA

CUDA Development Using NVIDIA Nsight, Eclipse Edition. David Goodwin

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

Introduction to Computer Systems

Teaching Cg. This presentation introduces Cg ( C for graphics ) and explains why it would be useful when teaching a computer graphics course.

Working with Metal Overview

Graphics Processing Unit Architecture (GPU Arch)

CS 543: Computer Graphics. Introduction

Shaders CSCI 4229/5229 Computer Graphics Fall 2017

Graphics Architectures and OpenCL. Michael Doggett Department of Computer Science Lund university

What s New with GPGPU?

GPGPU Applications. for Hydrological and Atmospheric Simulations. and Visualizations on the Web. Ibrahim Demir

GPGPU introduction and network applications. PacketShaders, SSLShader

Blink: 3D Display Multiplexing for Virtualized Applications

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

ECE 571 Advanced Microprocessor-Based Design Lecture 18

Jeremy W. Sheaffer 1 David P. Luebke 2 Kevin Skadron 1. University of Virginia Computer Science 2. NVIDIA Research

CS4621/5621 Fall Computer Graphics Practicum Intro to OpenGL/GLSL

ECE 571 Advanced Microprocessor-Based Design Lecture 20

2.11 Particle Systems

Headline in Arial Bold 30pt. Visualisation using the Grid Jeff Adie Principal Systems Engineer, SAPK July 2008

8/28/12. CSE 820 Graduate Computer Architecture. Richard Enbody. Dr. Enbody. 1 st Day 2

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

GPU Programming and Architecture: Course Overview

Power Efficiency for Software Algorithms running on Graphics Processors. Björn Johnsson Per Ganestam Michael Doggett Tomas Akenine-Möller

Motivation Hardware Overview Programming model. GPU computing. Part 1: General introduction. Ch. Hoelbling. Wuppertal University

Current Trends in Computer Graphics Hardware

AMD gdebugger 6.2 for Linux

PARALLEL PROGRAMMING MANY-CORE COMPUTING: INTRO (1/5) Rob van Nieuwpoort

Technology for a better society. hetcomp.com

Profiling and Debugging Games on Mobile Platforms

Copyright Khronos Group, Page Graphic Remedy. All Rights Reserved

NSIGHT ECLIPSE EDITION

To hear the audio, please be sure to dial in: ID#

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

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

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

Antonio R. Miele Marco D. Santambrogio

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

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

OpenACC Course. Office Hour #2 Q&A

CS 179: GPU Programming

Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University

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

printf Debugging Examples

Shaders CSCI 4239/5239 Advanced Computer Graphics Spring 2014

Graphics Processing Unit (GPU)

CENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL

Fast Interactive Sand Simulation for Gesture Tracking systems Shrenik Lad

More performance options

GPGPU in Film Production. Laurence Emms Pixar Animation Studios

Important new NVMe features for optimizing the data pipeline

GPU ARCHITECTURE Chris Schultz, June 2017

CMPE 665:Multiple Processor Systems CUDA-AWARE MPI VIGNESH GOVINDARAJULU KOTHANDAPANI RANJITH MURUGESAN

Comparison of CPU and GPGPU performance as applied to procedurally generating complex cave systems

Scan Conversion of Polygons. Dr. Scott Schaefer

COMP Preliminaries Jan. 6, 2015

Accelerating Realism with the (NVIDIA Scene Graph)

NSIGHT ECLIPSE EDITION

The Graphics Pipeline and OpenGL I: Transformations!

Transcription:

EE 4702-1, GPU Programming When / Where Here (1218 Patrick F. Taylor Hall), MWF 11:30-12:20 Fall 2017 http://www.ece.lsu.edu/koppel/gpup/ Offered By David M. Koppelman Room 3316R Patrick F. Taylor Hall Office Hours: Monday-Friday 15:00-16:00 Prerequisites by topic: C++. EE 4702-1 Fall 2017 1

GPU Definition GPU: Graphics Processing Unit Runs 3D graphics in place of CPU...... because it's much better at it. Also runs scientific-style computation in place of CPU. GPU is Main Component of Video Cards Major Companies and Brands NVIDIA ATI (Compaq/HP) Intel EE 4702-1 Fall 2017 2

This Course Focus is on GPU Programming Shader programming with OpenGL Shader Language (OGSL). GPGPU programming with CUDA. Also Some 3D Graphics, Game Physics Will cover enough graphics, OpenGL, and CUDA to do fun stuff. Game Physics Term Project Past Student Project Screenshots: EE 4702-1 Fall 2017 3

Simulation of a balloon. Balloon Demo GPU always runs 3D graphics. Code can switch between CPU-only and CPU/GPU physics. EE 4702-1 Fall 2017 4

System Overview Quick look at how the GPU fits into the larger system... Motherboard CPU Video Card GPU Bus (PCIe) CPU GPU Monitor EE 4702-1 Fall 2017 5

System Overview: Hardware Typical Hardware On Computer motherboard: CPU, CPU On Video Card GPU, GPU Connection between CPU/GPU via Bus, e.g., PCI Express (PCIe). Connection from video card to monitor. Motherboard CPU CPU Bus (PCIe) Video Card GPU GPU Monitor EE 4702-1 Fall 2017 6

Frame Buffer System Overview: Frame Buffer Frame Buffer Area of memory continuously converted to a video signal. Simple mapping from memory address to pixel coordinate. Older Systems Frame buffer in CPU memory. Application programs wrote frame buffer directly. Typical Current Systems Frame buffer in GPU memory. Frame buffer written by GPU hardware (typical)... in response to code on CPU. Monitor EE 4702-1 Fall 2017 7

Frame Buffer System Overview: Frame Buffer Frame Buffer Contents Position in FB corresponds to particular pixel on display. In illustration, first FB element is upper-left pixel. A common FB element size is 32 bits. Frame buffer format varies with video mode and of course system. Motherboard CPU CPU Bus (PCIe) Video Card GPU GPU Monitor EE 4702-1 Fall 2017 8

Simple Frame Buffer Code Example Consider Code frame_buffer[10][20] = 0; For Simple Code Example Assume The frame buffer is in CPU memory. Array frame_buffer points to the frame buffer location. Writing a 1 to the array makes a pixel white. Writing a 0 to the array makes a pixel black. EE 4702-1 Fall 2017 9

Simple Frame Buffer Example // Make screen all white. (Assume 1 is white.) // for ( int x = 0; x < width; x++ ) for ( int y = 0; y < height; y++ ) frame_buffer[x][y] = 1; Black Line // Draw a black diagonal line. // for ( int x = 0; x < height; x++ ) frame_buffer[x][x] = 0; Display EE 4702-1 Fall 2017 10

GPU Rationale Code on prior slide looked simple. How much more complex would balloon code be? Alot, of course! Motivation for a GPU: Graphics (3D animated, especially) requires alot of computation. CPU is less suited for that kind of computation. EE 4702-1 Fall 2017 11

System Overview: Code Organization Simplified View of Code on Typical System Who Wrote Code? User. (Call it the Ap.) Vendor of GPU. (Call it the driver.) Where Does It Run? CPU GPU All Four Possible: User/CPU, User/GPU, Vendor/CPU, Vendor/GPU EE 4702-1 Fall 2017 12

System Overview: Software Just For Today, Oversimplify to Two Kinds of Software Application Program (Ap for short*) Motherboard Video Card Written by ap. programmer. E.g., Balloon Demo Most of Ap runs on CPU. Part of Ap may also run on GPU. GPU Driver (Driver or Dr for short) CPU Bus (PCIe) GPU Written by GPU manufacturer. E.g., NVIDIA 384.59 Driver code runs on both CPU and GPU. Most work done by driver code that runs on GPU. CPU Ap Dr GPU Dr Ap *Don't confuse Ap with App. EE 4702-1 Fall 2017 13

System Overview: Running of Application Typical Execution Application, running on CPU, ready to emit next frame. App. calls driver on CPU......driver on CPU starts more driver code on GPU......application resumes on CPU (while GPU driver code still running). Process above repeated many times for a frame. Driver code ultimately will write frame buffer. Important Points CPU and GPU can run code at same time. EE 4702-1 Fall 2017 14

System Overview: Execution Activities Example Below Ap calls driver three times. First two times, driver does all work, mostly on GPU. Third time that ap calls driver, driver starts some ap code on GPU. Time CPU Ap Dr Ap Dr Ap Dr Ap GPU Dr Dr Dr Ap EE 4702-1 Fall 2017 15

Course Coverage Emphasis: GPU coding for high performance. Topics Needed For Term Project (a dynamic simulation) Topics Rudiments of Animation by Dynamic Simulation Term Project 3D Graphics basics: coordinates, transforms, primitives, colors, textures. Data movement and staging, efficiency. Coding with GPU shader model, CPU/GPU load balancing. Coding with CUDA, GPU physics. EE 4702-1 Fall 2017 16

APIs, Languages, Standards Used OpenGL (Version 4.5) An API for controlling GPUs from CPU. OpenGL Shader Language (Version 4.50) A language for code (usually graphical) that runs on GPUs. CUDA (Version 8.0) An NVIDIA language for code (usually not graphical) that runs on GPUs. C++11 A common programming language. Students are assumed to be familiar with C++. EE 4702-1 Fall 2017 17

Toolchain Operating Systems Red Hat Enterprise Linux 7 (or Scientific Linux 7) Compiler gcc (GNU C Compiler) Debugger gdb (GNU Debugger) Students expected to learn and use gdb. Text Editor EMACS (recommended) Code Repository Git. (Classroom examples, homework assignments, etc.) EE 4702-1 Fall 2017 18

Graphics Equipment For assignments, use equipment in Workstation Lab Workstation Lab Live Status Updates: http://www.ece.lsu.edu/koppel/gpup/sys-status.html Room 126 EE Building Several kinds of computers. Graphics Workstations Mix of recent high-end graphics GPUs. NVIDIA GTX 1080s (Fall 2017) Some machines have scientific-computing-grade accelerators: NVIDIA K20c, GP100 Intel Xeon Phi EE 4702-1 Fall 2017 19