GPGPU using CUDA Thrust Technical Talk –15/09/2015 1
1
GPGPU using
CUDA ThrustTechnical Talk –15/09/2015
2
General Purpose computing on Graphics Processing Units◦ 2000
Programmable shaders -> Matrices/Vectors computation
◦ 2006 NVIDIA CUDA
Solutions◦ NVIDIA CUDA◦ OpenCL◦ OpenACC
GPGPU
3
4
Multi-core processor
5
CUDA - Grid
6
Adding two vectors
7
Memory access influences the performance
8
Memory access influences the performance
9
Why CUDA then?
10
High-level interface◦ C++ Standard Template Library (STL)◦ Interoperability
CUDA OpenMP
CUDA Thrust
11
Sorting◦ Stable/Unstable◦ By key
Set Operations◦ Difference◦ Intersection◦ Union
Reductions◦ Counting◦ Extremes◦ User-defined
Searching Random Number Generation
Algorithms available in Thrust
http://docs.thrust.googlecode.com/hg/modules.html
12
https://github.com/thrust/thrust/blob/master/examples/weld_vertices.cu
Thou shalt use STL and Templates!!
13
14
Bounding box computation Approximate Voronoi Diagram Dot Product Histograms Monte carlo methods
Some Useful Examples
https://github.com/thrust/thrust/tree/master/examples
15
GPGPU using
CUDA ThrustTechnical Talk –15/09/2015