a case study using modern c
play

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


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

  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)

  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

  4. Ordinary differential equation • Derivatives with respect to only one variable • With PDE, surface change over time, ODE particle moving through time • Eulers method:

  5. Odeint • C++ library for solving ODE’s numerically • Use odeint solving cababilities with gpgpu libraries • State type, algebra, operation.

  6. Odeint – Stepper (runge-kutta)

  7. Odeint - integrate

  8. Lorenz system

  9. Lorenz - Thrust

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

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

  12. ViennaCL Kernel is created once and buffered

  13. Results

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend