GPGPU - General Purpose GPU
- allows to implement generic applications
- has high performance
Language: C extension
NVidia's CUDA
OpenCL Standard
1st version of the compiler
Integration of GPU
in Current Applications
current version( beta ) is not yet released
use of GPU to accelerate the algorithms
used in tools for simulation
Perspectives
compiler inteligence to optimize
tasks and memory allocations
benchmark over the several matrix samples
of L2EP (simulation tools)
Gaspard2 Environment
Architecture Model
Application Model
Research Topics
Application and
Architecture Modeling
GPU Performance for
Simulation of Electric Machines
Eclipse based Gaspard2 Environment
Gaspard2 and GPUs
Wendell Rodrigues
M. Jean-Luc Dekeyser and M. Frederic Guyomarc'h
DaRT - USTL - LIFL
INRIA Lille
Association Model
Modeling Concepts for Embedded Systems
- UML - Unified Modeling Language (OMG Standard)
- MARTE profile - Modeling and Analysis of Real-time and Embedded systems
- MDA - Model Driven Architecture
PIM : Platform Independent Model
PSM : Platform Specific Model
GPU
Model to Model and Model to Text Transformations
What is that?
Graphics Processing Unit
How to program?
Examples and Results
Vector Multiplication Simple Example
int main() {
float *a, *dev_a;
float *b, *dev_b;
float *c, *dev_c;
a = initvec();
b = initvec();
dev_a = hosttodev(a);
dev_b = hosttodev(b);
<<grid,bloc>>kernelmult(dev_a, dev_b, dev_c);
c = devtohost(dev_c);
}
Thread Global Index = 5
Thread Global Index = 4
Thread Global Index = 3
__global kernelmult(dev_a,dev_b,dev_c) {
int i = globalindex();
dev_c[i] = dev_a[i]*dev_b[i];
}
for (i=0,i<N,i++)
c[i] = a[i]*b[i];
Another Example
Differential equation solvers
- Maxwell's equations can be formulated
as a system of partial differential equations.
- Finite Element Method (FEM)
- Resulting a linear system: Ax = b
- Direct Solver: Conjugate Gradient
without preconditioner
Conjugate Gradient
Compumag 2009: Parallel Sparse Matrix Solver on the GPU Applied to Simulation of Electrical Machines
Optimizations:
- Loop Control in GPU
- Parallel Reduction (dotProduct)
- Matrix Storage Format
- Memory optimization