Date post: | 21-May-2015 |
Category: |
Technology |
Upload: | mikarber |
View: | 1,112 times |
Download: | 3 times |
Java & GPGPUGeneral-Purpose on Graphics Processing Unit
jeudi 28 février 2013
GPGPU ?
General-Purpose processing on Graphics Processing Units
Calcul massivement parallèle (!= CPU)
Standardisation
1 programme à la fois (Execution)
Impossible de lire et écrire en même temps
jeudi 28 février 2013
Applications
Traitement d’image / convolutions
Rendu 3D (ray-tracing, imagerie médicale)
Système de particules
Physique / Collision
Simulation (Météo, neurones)
Chiffrage / Déchiffrage / Décryptage
jeudi 28 février 2013
GPU Roadmap
Geforce GTX 560 : 336 coeurs / 810 Mhz
Geforce GTX 660 : 960 coeurs / 980 Mhz
Geforce GTX 690 : 3072 coeurs / 915 Mhz
Radeon HD 6870 : 1120 coeurs / 900 Mhz
Radeon HD 6990 : 3072 coeurs / 830 Mhz
jeudi 28 février 2013
GPGPU SDKs
CompatibilitéCompatibilitéCompatibilitéCompatibilitéCompatibilité
NVIDIA AMD Intel ARM IBM
SDKs
CUDA
SDKs ATI StreamSDKs
OpenCL
jeudi 28 février 2013
Java & OpenCL
JNI
Bindings
JavaCL/OpenCL4Java,
JOCL
JCUDA
OpenCL / CUDA «traduit»
jeudi 28 février 2013
JOCL Binding Java pour OpenCL
JogAmp
String programSource = "__kernel void "+ "sampleKernel(__global const float *a,"+ " __global const float *b,"+ " __global float *c)"+ "{"+ " int gid = get_global_id(0);"+ " c[gid] = a[gid] + b[gid];"+ "}";
jeudi 28 février 2013
Aparapi«Write once, run everywhere»
Traduit le bytecode Java en OpenCL automatiquement
une seule version du programme à maintenir
Compilation en OpenCL au runtime
Kernel kernel = new Kernel(){ @Override public void run(){ int i = getGlobalId(); result[i] = inA[i] + inB[i]; } }; Range range = Range.create(result.length); kernel.execute(range);
jeudi 28 février 2013
RootBeer
Java, comme Aparapi
Meilleurs support bytecode
Traduction Java -> OpenCL & sérialisation faite une fois pour toutes dans un nouveau jar
java -jar Rootbeer.jar ArraySumApp.jar ArraySumApp-GPU.jar
jeudi 28 février 2013
Sumatra
Intégré dans Java 8 (2013)
Basé sur les closures
Transformation du code Java en OpenCL par la JVM
Distribution de la charge CPU/GPU
AMD & Oracle
jeudi 28 février 2013
Démo & Questions
jeudi 28 février 2013