A Case Study Using Modern C++ Libraries Frameworks Cuda NVIDIA - - PowerPoint PPT Presentation

a case study using modern c
SMART_READER_LITE
LIVE PREVIEW

A Case Study Using Modern C++ Libraries Frameworks Cuda NVIDIA - - PowerPoint PPT Presentation

Programming Cuda and OpenCL A Case Study Using Modern C++ Libraries Frameworks Cuda NVIDIA Large set of libraries Compute kernels compiled to PTX (low level) OpenCL Cross platform API - Boilerplate code Compute


slide-1
SLIDE 1

Programming Cuda and OpenCL A Case Study Using Modern C++ Libraries

slide-2
SLIDE 2

Frameworks

  • Cuda
  • NVIDIA
  • Large set of libraries
  • Compute kernels compiled to PTX (low level)
  • OpenCL
  • Cross platform
  • API - Boilerplate code
  • Compute kernels compiled to C-like sources (higher level)
slide-3
SLIDE 3

Libraries

  • (C)MTL4 (The Matrix Template Library)
  • Linear algebra library
  • DSL embedded in c++
  • High level, compile time transformations
  • Cuda
  • VexCL (Vector Expression Template Library)
  • Convenient vector and matrix
  • OpenCL
  • Reduce boilerplate code
  • ViennaCL (The Vienna Computing Library)
  • Linear Algebra
  • Cuda and OpenCL (only OpenCL in article)
  • Thrust
  • Resembles c++ STL
  • Reference point
slide-4
SLIDE 4

Ordinary differential equation

  • Derivatives with respect to only one variable
  • With PDE, surface change over time, ODE particle moving through

time

  • Eulers method:
slide-5
SLIDE 5

Odeint

  • C++ library for solving ODE’s numerically
  • Use odeint solving cababilities with gpgpu libraries
  • State type, algebra, operation.
slide-6
SLIDE 6

Odeint – Stepper (runge-kutta)

slide-7
SLIDE 7

Odeint - integrate

slide-8
SLIDE 8

Lorenz system

slide-9
SLIDE 9

Lorenz - Thrust

slide-10
SLIDE 10

Lorenz - CMTL4

150 % overhead with a 3-component vector with 4K entries compared to one vector of size 12K

slide-11
SLIDE 11

Lorenz - VexCL

1 Kernel call instead of 3 -> 25% performance gain (Large systems)

slide-12
SLIDE 12

ViennaCL

Kernel is created once and buffered

slide-13
SLIDE 13

Results