and Parallel Algorithms Programming with CUDA, WS09 Waqar Saleem, Jens Müller

Similar documents
Real-Time Ray Tracing Using Nvidia Optix Holger Ludvigsen & Anne C. Elster 2010

Programming with CUDA

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Part IV. Review of hardware-trends for real-time ray tracing

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

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

Cross-Hardware GPGPU implementation of Acceleration Structures for Ray Tracing using OpenCL

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

Introduction to Parallel and Distributed Computing. Linh B. Ngo CPSC 3620

Intro to Ray-Tracing & Ray-Surface Acceleration

CUDA PROGRAMMING MODEL Chaithanya Gadiyam Swapnil S Jadhav

V-Ray RT: A New Paradigm in Photorealistic Raytraced Rendering on NVIDIA GPUs. Vladimir Koylazov Chaos Software.

GPGPU, 1st Meeting Mordechai Butrashvily, CEO GASS

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

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

Recursion and Data Structures in Computer Graphics. Ray Tracing

GPU for HPC. October 2010

COMP371 COMPUTER GRAPHICS

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

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

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

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Multi-Processors and GPU

A General Discussion on! Parallelism!

Introduction to CUDA Algoritmi e Calcolo Parallelo. Daniele Loiacono

Introduction to GPU hardware and to CUDA

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

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

Lecture 18: Primer on Ray Tracing Techniques

CS427 Multicore Architecture and Parallel Computing

GPU programming. Dr. Bernhard Kainz

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

CS516 Programming Languages and Compilers II

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Portland State University ECE 588/688. Graphics Processors

Heterogenous Computing

GPGPUs in HPC. VILLE TIMONEN Åbo Akademi University CSC

GPU-Based Volume Rendering of. Unstructured Grids. João L. D. Comba. Fábio F. Bernardon UFRGS

G P G P U : H I G H - P E R F O R M A N C E C O M P U T I N G

Accelerating CFD with Graphics Hardware

NVIDIA Fermi Architecture

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Multimedia in Mobile Phones. Architectures and Trends Lund

Cross Teaching Parallelism and Ray Tracing: A Project based Approach to Teaching Applied Parallel Computing

Ray-Tracing. Misha Kazhdan

CS4230 Parallel Programming. Lecture 3: Introduction to Parallel Architectures 8/28/12. Homework 1: Parallel Programming Basics

Computing on GPUs. Prof. Dr. Uli Göhner. DYNAmore GmbH. Stuttgart, Germany

Ray Tracing. Kjetil Babington

Benchmark 1.a Investigate and Understand Designated Lab Techniques The student will investigate and understand designated lab techniques.

GPU 101. Mike Bailey. Oregon State University. Oregon State University. Computer Graphics gpu101.pptx. mjb April 23, 2017

GPU 101. Mike Bailey. Oregon State University

AN ACCELERATION OF FPGA-BASED RAY TRACER

Graphics 2009/2010, period 1. Lecture 8: ray tracing

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Assignment 6: Ray Tracing

Parallel Computer Architecture and Programming Final Project

General Purpose GPU Programming (1) Advanced Operating Systems Lecture 14

Blue-Steel Ray Tracer

Introduction to CUDA Algoritmi e Calcolo Parallelo. Daniele Loiacono

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

1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7.

Efficient and Scalable Shading for Many Lights

GPU Computing: Development and Analysis. Part 1. Anton Wijs Muhammad Osama. Marieke Huisman Sebastiaan Joosten

Using Graphics Chips for General Purpose Computation

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

EXPLOITING ACCELERATOR-BASED HPC FOR ARMY APPLICATIONS

Message Passing Interface (MPI)

Lecture 15: Introduction to GPU programming. Lecture 15: Introduction to GPU programming p. 1

NVIDIA s Compute Unified Device Architecture (CUDA)

NVIDIA s Compute Unified Device Architecture (CUDA)

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

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

03 RENDERING PART TWO

EDAN30 Photorealistic Computer Graphics

Graphics Processor Acceleration and YOU

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

A General Discussion on! Parallelism!

Lecture 7: The Programmable GPU Core. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

CS 410: Computer Graphics

GPU Programming for Mathematical and Scientific Computing

CSCI 402: Computer Architectures. Parallel Processors (2) Fengguang Song Department of Computer & Information Science IUPUI.

COMP 175 COMPUTER GRAPHICS. Lecture 11: Recursive Ray Tracer. COMP 175: Computer Graphics April 9, Erik Anderson 11 Recursive Ray Tracer

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

GPGPU/CUDA/C Workshop 2012

General-purpose computing on graphics processing units (GPGPU)

Challenges for GPU Architecture. Michael Doggett Graphics Architecture Group April 2, 2008

Shadows. COMP 575/770 Spring 2013

Real-time Ray Tracing on Programmable Graphics Hardware

GPU & High Performance Computing (by NVIDIA) CUDA. Compute Unified Device Architecture Florian Schornbaum

GPU Ray Tracing at the Desktop and in the Cloud. Phillip Miller, NVIDIA Ludwig von Reiche, mental images

CS 179: GPU Programming

Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow. Takahiro Harada, AMD 2017/3

EE 4702 GPU Programming

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

The Art of Parallel Processing

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

Project 1 Simple Ray Tracer

Trends and Challenges in Multicore Programming

Transcription:

Programming with CUDA and Parallel Algorithms Waqar Saleem Jens Müller

Organization People Waqar Saleem, waqar.saleem@uni-jena.de Jens Mueller, jkm@informatik.uni-jena.de Room 3335, Ernst-Abbe-Platz 2 The course will be conducted in English 6 points Wahl/Wahlpflicht Theoretical/Practical

Organization Meetings, before winter break Tue 12-14, CZ 129 Thu 16-18, CZ 129 Every second week Starting next week Exercises: Wed 8-10, CZ 125 Starting tomorrow in the pool

The course 2 parts Before winter break: Lectures and assignments Need at least 50% in assignments to qualify for... After the break: Group projects Project chosen by or assigned to each group Regular meetings Presentation of each project on semester end

Assignments Build up a minimal ray tracer on GPU Implement basic ray tracer on CPU Port to GPU Make ray tracer more interesting/efficient Utilize CUDA concepts Basic framework will be provided Scene format and scenes Introduction to ray tracing concepts

Requirements Strong background in C programming Familiarity with your OS Modifying default settings Writing/understanding Makefiles Compiler flags and options

Course content Parallel programming models and platforms GPGPU GPGPU on NVIDIA cards: CUDA Architecture and programming model OpenCL

Today Organization Brief introduction to parallel programming and CUDA Short introduction to Ray tracing

Growth of Compute Capability Moore s law: the number of transistors that can be placed... on an integrated circuit [doubles] approximately every two years source: wikipedia

Growth of Compute Capability Moore s law source: wikipedia

Need for increasing compute capability Problems are getting more complex e.g. Text editing to Image editing to Video editing Current hardware complexity is never enough Impractical to stop development at current state of the art

Barriers to growth Natural limit on transistor size: the size of an atom More transistors per unit area lead to higher power consumption and heat dissipation

Solution: Parallel architectures

Parallel architectures Multiple Instructions Multiple Data (MIMD) multi-threaded, multi-core architectures, clusters, grids Single Instruction Multiple Data (SIMD) Cell processor, GPUs, clusters, grids GPU: Graphics Processing Unit Parallel programming allows to program for parallel architectures

GPU architecture Simpler architecture than MIMD Little overhead for instruction scheduling, branch prediction etc. Subsequent figures from NVIDIA CUDA Programming Guide 2.3.1 unless mentioned otherwise

GPU architecture Simpler architecture leads to higher performance (compared to CPUs)

General Purpose computing on GPU, GPGPU Attractive because of raw GPU power Traditionally hard because GPU programming was closely associated to graphics Simplicity of GPU architecture limits the kind of problems suitable for GPGPU or at least requires some problems to be reformulated

GPGPU for the masses* Freeing the GPU from graphics: Nvidia CUDA, ATI Stream C-like programming interface to the GPU * - knowledge of underlying architecture required to achieve peak performance

Freeing Parallel Programming OpenCL: code once, run anywhere single core, multi core, GPU,... platform details transparent to the user supported by major vendors: Apple, Intel, AMD, Nvidia,... OpenCL drivers made available by ATI and Nvidia for their cards

This course chiefly CUDA: Nvidia specific, mature, well documented, easily available literature some OpenCL: open standard, very new, limited documentation available, very similar concepts to CUDA no ATI Stream

CUDA, Compute Unified Device Architecture Software: C like programming interface to the GPU Hardware: the hardware that supports the above programming model

CUDA hardware model

CUDA programming model CPU=host, GPU=device, work unit=thread

Ray tracing A method to render a given scene Cast rays from a camera into the scene Compute ray intersections with scene geometry Render pixel image source: wikipedia

Ray tracer complexity A ray tracer can be arbitrarily complex Recursively compute intersections for reflected, refracted and shadow rays Account for diffuse lighting Consider multiple light sources Consider light sources other than point lights Account for textures: object materials

Coding a ray tracer Relatively easy to code on the CPU Call the same intersection function recursively on secondary rays CPU code is not so complex Tricky to code on the GPU as recursion is not yet supported in GPGPU models

This course Build a trivial ray tracer on the CPU compute view rays only part of tomorrow s exercise Port to GPU Add complexity to your GPU ray tracer

Reminders Exercise session tomorrow Register on CAJ

See you next time!